Question: 1 . Write a C + + program that does the following: a . Create a C + + file with the name problem 4

1. Write a C++ program that does the following:
a. Create a C++ file with the name problem4.cpp.
b. Prompt the user to enter a sequence of numeric grades until the user enters a negative grade.
c. Compute and print the average grade.
Sample run of the program:
Enter a numeric grade (enter a negative number to stop): 78
Enter a numeric grade (enter a negative number to stop): 89
Enter a numeric grade (enter a negative number to stop): 77
Enter a numeric grade (enter a negative number to stop): 90
Enter a numeric grade (enter a negative number to stop): 97
Enter a numeric grade (enter a negative number to stop): 92
Enter a numeric grade (enter a negative number to stop): -1
The average grade is 87.1667

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!