Conditional statements, functions, scope
Description
Write a simple program to print a large version of the number digits. The program should be written with functions:
• One function to print the program “Welcome banner”
• One function to get a valid choice from the user (0-9 or X)…only the first character entered should be considered.
• One function to print the big number
• A main() function that controls the program
Sample Run
To demonstrate, I have written a version of the assignment and posted the Windows executable in Canvas (sorry, Mac/Linux users). I have tested it for every digit, for several letters and for the letter ‘x’. Here is a screen shot of my test using 3, Q, 0, and x:
Hints
cin.ignore(256,’\n’);
will ignore up to the next 256 characters in the input stream and stop ignoring after a ‘\n’ is reached.
Submission
All parts of the submission are to be uploaded in Canvas by the due date. Refer to the style guide posted in Canvas!
1. Write and submit pseudo-code (or flow chart) to describe how your program will operate
2. Write and submit a C++ source code file that implements your solution.
a. Your source code must contain appropriate internal documentation (comments)
b. Your source code must be neatly formatted for readability.
3. Submit some evidence of testing. (e.g. Documented and described screenshots that show the results of your tests.)
This assignment has been answered 5 times in private sessions.
© 2024 Codify Tutor. All rights reserved