Get rid off negative averages
So I pulled this from the C++ tutorial here and played around with it to make it into a program that averages ten grades. How ever when I input all negative grades it gives a negative average. How would I and where would I input an if statement(not sure if this is what I would use) that would say basically if the average is less than zero than display ---%.
Thanks for your help I'm pretty new at all of this.
int i,sum=0, avg=0;
cout << "Grade " << i+1 << ": ";
cin >> grade[i];
cout << "Average Grade: " << avg << "%" << endl;