Trying to write a program that calculates a students grade based on how many assignments have been graded. I am using a switch case since there is a total of 5 assignments, however when I enter case 1, and enter in how many I got out of 100, it just closes the program it doesn't go to the next part any ideas?
A loop? Don't think he needs one, the way he's structured it you would put in the number of assignments, say 3, then the scores for those, say 98, 15 and 40, then those would be totaled as a percentage based on max scores and weighting and then converted to a lettered grade.
So each case would include the calculations and inputs from the cases before it plus the calculation and input for the last assign graded.
It's easier with a loop and that's the way I'd do it too, but he said he wanted to use a switch statement.
Last edited on
Topic archived. No new replies allowed.
You are using a version without Ads of this website. Please, consider donating: