I have a textbook exercise right after looping and using char values (meaning that I can’t use arrays and strings).
As per the exercise, I’ll (the user) will have to make the user enter a set of chars
For example “IamaDinosaur” and then find the letter with the highest ASCII value.
How do I go about looping a scanf() to let the user enter char values until the user hits enter? And then how are the values compared?
If you can’t use
getch(), then just as folks suggest you can of course usescanf()and just keep on scanning until it fails, or reads a newline: