Details of this Paper

Write a program to convert a digit into its English name

Description

solution


Question

Write a program to convert a digit into its English name. Digit must be greater than 0 and less than 1000. Make sure to validate input. Program should continue to run until user is finished (user can convert as many digits as wishes).;Use at least four functions;A few functions to consider;string digit_name(int);string teen_name(int);string tens_name(int);string int_name(int);SAMPLE RUN;Please enter a positive number (between 0 and 1000): -123;Integer must be between 0 and 1000 Re-enter number=>123;one hundred twenty three;Another number?? (1 for yes, 2 for no = > 1;Please enter a positive number (between 0 and 1000): 32;thirty two;Another number?? (1 for yes, 2 for no = > 1;Please enter a positive number (between 0 and 1000): 1200;Integer must be between 0 and 1000 Re-enter number=>12;twelve;Another number?? (1 for yes, 2 for no = > 1;Please enter a positive number (between 0 and 1000): 120;one hundred twenty;Another number?? (1 for yes, 2 for no = > 2

 

Paper#69248 | Written in 18-Jul-2015

Price : $32
SiteLock