Fri Apr 08, 2011 10:29 pm
Fri Apr 08, 2011 11:27 pm
int x[5]={3,4,5,6,6};
float evenAvg=0;
float eventCount=0;
for(int i=0;i<5;i++){
if(x[i]%2==0)
{
evenAvg+=x[i];
eventCount++;
}
}
evenAvg/=eventCount;
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.