Current location - Education and Training Encyclopedia - University rankings - How to use C language to program "Give a score of 100 and get an output score"?
How to use C language to program "Give a score of 100 and get an output score"?
Because your score is of char type, if char is a single character, you can only read one character. For example, if you enter 80 and actually read 8, then the number you read must be less than 10, which is naturally E.

If you don't believe me, you can look at the results of the following code.

The road to code is still very long, come on ~ ~

As for how to change it, just change it to int input.