In a loop, ask the user to input a number (a string containing only characters 0..9). Convert the input string to a number.
Start simple ... First a, next b, ...
Draw a state diagram before coding. This will help you design your code.
(ask the instructor about state diagrams)
State Diagram (Wikipedia)