View Single Post
Old 03-13-2005, 01:27 PM   #3 (permalink)
anandgagrawal
 
Newb Techie

Join Date: Mar 2005

Posts: 3

anandgagrawal

Default

The solution i think is that u use an array to store the exps
i.e

float exp[3]
exp[0]=23.4+....
exp[1]=32.44+...
and so on
then in the for loop (u need to usse only 1)
u simply write
for(i=0;i<4;i++)
{
exp[i]=exp[i]/6
Printf("The avg for exp %d is %f",i,exp[i]);
}
Thats all
anandgagrawal is offline