Answer to Question #5303 in C++ for anum
write a program which takes 10 floating points values from the user,save them in an array.then display the average of those values.
float a, ave;
& cout<<"Enter a number "<<i+1<<": ";
ave = 0;
for (i=0;i<=9;i++) ave = ave + a[i];
ave = ave/10;
cout<<"Average value is "<<ave;
No comments. Be first!