|
|
num
) to a single number average
. At the end, divide average
by the number of numbers the user entered N
.double total = 0;
total = total + num;
|
|
for (int i = 1; i < N; ++1)
for (int i = 1; i <= N; ++i)
|
|
Please, enter 10 grades, one at a time, and the program will return the highest grade and the average of all ten. Enter the first grade: 90 Enter another grade: 91 Enter another grade: 92 Enter another grade: 93 Enter another grade: 94 Enter another grade: 95 Enter another grade: 96 Enter another grade: 97 Enter another grade: 98 Enter another grade: 99 The highest grade is: 99% The average grade is: 94.5% Press any key to continue . . . |