and then i get the following as outputCode:float average (float x[], int n)
{
float sum =0.0;
int i;
float average;
for (i=0; i<n; i++)
sum +=x[i];
return average =(sum/float(n));
}
any suggestions?Code:Enter file name -> nums.txt
x[0] = 1
x[1] = 2
x[2] = 3
x[3] = 76
x[4] = 56
x[5] = 45
The average is: 0x00401028
Press any key to continue