how do I make this program calculate the grade average on this fake test I made?
here is the test i made and it all checks out - now I need it to print out the grade made on the test after completion.
One way you could do it is by having a char for the answer for each question. So an answer1, answer 2, answer 3, answer 4, answer 5. Then have a bunch of if statements at the end like so:
This isn't the best option but based off the rest of your code this is probably an easier way for you to understand. You would need an if statement for each possibility.
There are much more simple and efficient ways where you could use loops and such but this is something you can consider.
Well you could give each question an integer value and each loop decrement it by one point. Then at the end, use that to gauge the score.
Start out with 25, then each answer wrong, lose a point. Or Number of questions * 4 (the number of answers);