Congrats on completing your assignment.
If you are interested, there's a better way to approach this because any time you see 10 almost-identical variables and 10 almost-identical blocks of code you should be thinking about using an array and a loop.
So instead of g1, g2, g3 etc you would have int g[10] and you main code would look like:
for (int i = 0; i<g.length; i++) {
if (g[i] >= 90) {
grade = 'A';
} else if (g[i]>= 80) { ...
Just think what would happen if your next assignment is to do the exactly the same thing but for 200 students...
JamesCherrill
... trying to help
8,667 posts since Apr 2008
Reputation Points: 2,636
Solved Threads: 1,476
Skill Endorsements: 33