Question: Q. Write a function named digit_name that takes an integer argument in the range from 1 to 9, inclusive, and prints the English name for

 Q. Write a function named "digit_name" that takes an integer argument

Q. Write a function named "digit_name" that takes an integer argument in the range from 1 to 9, inclusive, and prints the English name for that integer on the computer screen. No newline character should be sent to the screen following the digit name. The function should not return a value. The cursor should remain on the same line as the name that has been printed. If the argument is not in the required range, then the function should print "digit error" without the quotation marks but followed by the newline character. Thus, for example: The statement digit_name (7); should print seven on the screen; the statement digit_name(); should print digit error on the screen and place the cursor at the beginning of the next line. (USING DEVC++) (C++)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!