Create a program to continually input grades from the user. Exit the loop when the user types a grade less than 0. Then tell the user how many grades he entered (eg. "You entered 5 grades") and calculate and report the average of the grades. Make sure it doesn't include the negative number!
heres what i got so far: I need it to calculate the average of the grades the user inputs, then output it. But i am having trouble doing that.
using namespace std;
cout<<"Enter a grade\n";
Please note that this is not a homework site. We won't do your homework for you. The purpose of homework is that you learn by doing. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.
We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again.