(Practice) Rewrite Program to compute the average of 10 numbers.
Program:
#include#include using namespace std;int main( ){const int MAXNUMS = 4;int count;double num, total, average;cout << "\nThis program will ask you to enter "<< MAXNUMS << " numbers.\n";count = 1;total = 0;while (count <= MAXNUMS){cout << "Enter a number: ";cin >> num;total = total + num;count++;}count--;average = total / count;cout << "\nThe average of the numbers is " << average << endl;return 0;}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.