- #1
Peter P.
- 23
- 0
Homework Statement
The problem that was given was to prompt the user to type words with no spaces in between, and end it by pressing enter. From there, the program would calculate which letter comes the latest in the alphabet and is included in what the user types in.
example.
user types in: ABCDcduUlkO<enter>
program determines that 'u' appears latest in the alphabet based on ASCII values (also if there are either a capitalized or minimized version of a letter, they will be treated as having the same value, but the first one that appears will be displayed).
Homework Equations
The Attempt at a Solution
The problem that i am having is only with the input part, scanf. we are forced to used things we only learned in the lectures or up to a certain point in the textbook. normally i would use arrays to do this, but we didn't get that far yet.
so i know that scanf takes in the first character that is pressed only when you ask for input on a type char variable. is there any way around this or even for the program to do calculations after each keypress until they press enter?