how can i fix this code, im trying to learn C,
well basically it works, but it enters an unecessary input after, a valid one, so the loop would end after 5 times, while it should be 10.
However if you press enter after each input, there is some info for you: pressing enter adds another character to input stream (newline character) which is going to be read by %c.
To skip all whitespace characters, simply enter space before format specifier: scanf(" %c", &grade);