Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3 Program 2 - Printing Letters YUF is very impressed with your work. He has another task for you, upon completion of which he will
3 Program 2 - Printing Letters YUF is very impressed with your work. He has another task for you, upon completion of which he will reward you with more money than you can imagine (and you can imagine a lot). He has decided that he likes labeling things that belong to him. However, he believes his time would be better spent in acquiring things to label, and decides to delegate the menial task of inscribing his name, to you. In the same vein, you decide to write a program to perform this repetitive task. Write a C++ program to print the letters Y, U and F in ASCII art. Make sure your program conforms to the following requirements: 1. This program should be called letters.cpp 2. Accept the size of the letter in the number of lines) from the user. This number should be an odd number greater than or equal to 7. If the value entered is invalid, tell the user so, and ask for another one. Repeat until you get a valid size. (6 points) 3. Accept the letter to be printed from the user. If the letter is Y, U or F, go to the next step. If not, tell the user that the letter is invalid, and ask for another one. Repeat until you get a valid letter. (6 points) 4. Print the letter in ASCII art form. The sample run gives examples for each letter. The letter has to scale in both length and width - that is, it should be the same number of characters across and down, as shown in class. (30 points, 10 per letter) 5. Repeat the entire process if the user indicates they wish to continue. (4 points) 6. Make sure you add comments to explain the logic. (4 points) 3.1 Sample Run Welcome to the letter printer. Enter the size : 3 Invalid size. Enter the size again: -4 Invalid size. Enter the size again: 7 Enter the letter: C Invalid letter: Enter the letter again: # Invalid letter: Enter the letter again: j Invalid letter: Enter the letter again: U * 3
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started