First time asking! Trying to work on a menu...
EDIT: Ok, apparently there is a size limit to these questions, so I can't upload the code directly. I WILL however put it on a viewable pastebin. The program I'm working on is in C, it is supposed to allow the user to- #1: Input your initial (With the option for 'Z' to allow the user to exit the program/start the exit track) #2: Input your numeric grade (0-100), whereupon the program gives you a letter grade (or tells you its invalid, if you entered a number outside 0-100), ticks appropriate counters(total students, A students, total grades, etc) #3: boots the user back to the first question so they can repeat as many times as desired, until they trigger the exit track, then it gives them metrics like # of users, average grade, how many 'A' students, etc.) Problems: #1: When they input a valid grade number, like 87, it tells them they got a 'B', but it ALSO triggers the if-statement designed for invalid grades. here's an example: Attention, deviants. Please do not adjust your internets. This is a public service announcement. Problem #2: I can't figure out a way to design the program so that the exit track will trigger properly. Apparently counters that are edited in a loop are only readable while in that loop...so if I send the user -out- of the loop, I can't output all those nice metrics that were being tallied. Problem #3: The very first run (Initial, then grade) will at least get the proper response (not counting the bonus 'invalid grade' response), but all subsequent attempts ignore my input initial. :/ PASTEBIN LINK FOR CODE: https://pastebin.com/djiCHbhj