Page 1 of 1
Select the function that takes an argument in the range from 1 to 9, inclusive, and prints the English name for that int
Posted: Fri May 20, 2022 2:49 pm
by answerhappygod

- Select The Function That Takes An Argument In The Range From 1 To 9 Inclusive And Prints The English Name For That Int 1 (53.08 KiB) Viewed 21 times

- Select The Function That Takes An Argument In The Range From 1 To 9 Inclusive And Prints The English Name For That Int 2 (58.4 KiB) Viewed 21 times
Select the function that takes an argument in the range from 1 to 9, inclusive, and prints the English name for that integer on the computer screen. If the argument is not in the required range, then the function should print an error message. If a match is found, the function should stop evaluating the rest of the code in the function logical code block. case 1 void digitName (int digitValue) { switch (digitValue) { case o : cout << "zero\n"; break; : cout << "one\n"; break; case 2 : cout << "two\n"; break; case 3 ; cout << "three\n"; break; case 4 :cout << "four\n"; break; case 5 : cout << "five\n"; break; : cout << "six\n"; break; case 7 : cout << "seven\n"; break; case 8 :cout << "eight\n"; break; : cout << "nine\n"; break; default : cout << "digit error\n"; case 6 case 9
void digitName (int digitvalue) { switch (digitValue) { case 1 :cout << "one\n"; break; case 2 : cout << "two\n"; break; case 3 : cout << "three\n"; break; : cout << "four\n"; break; case 5 : cout << "five\n"; break; : cout << "six\n"; break; case 7 : cout << "seven\n"; break; : cout << "eight\n"; break; case 9 : cout << "nine\n"; break; default : cout << "digit error\n"; case 4 case 6 case 8 } } o void digitName (int digitValue) switch (digitValue) { case 1 : cout << "one\n"; case 2 ; cout << "two\n"; case 3 : cout << "three\n"; case 4 : cout << "four\n"; case 5 : cout << "five\n"; case 6 : cout << "six\n"; case 7 : cout << "seven\n"; case 8 : cout << "eight\n"; case 9 : cout << "nine\n"; default : cout << "digit error\n"; }