12977 - Transcribe Numbers   

Description

  • Write a program that asks the user for a two-digit number (10 ~ 99), then prints the English word for the number.
  • Break the number into two digits.
  • Use a switch statement to print the word for the first digit (i.e. twenty, thirty, etc).
  • Use another switch statement to print the second digit.
  • Deal with special cases: 11~19.
  • If not a double digit number, print "invalid\n".

 

Input

0 < n <= 99

Output

  • A string of characters.
  • Or two strings of characters separated by a hyphen "-" character.

Sample Input  Download

Sample Output  Download

Tags




Discuss