Convert a String to a Number

Project

In a loop, ask the user to input a number. Convert the input string to a number.

Start simple ... First a, next b, ...

  1. unsigned integer (123)
  2. signed integer ([+-]123)
  3. signed float ([+-]123.45)
  4. scientific notation ([+-]123.45e[+-]10)

Hint

Draw a state diagram before coding. This will help you design your code.

(ask the instructor about state diagrams)

State Diagram (Wikipedia)