You are required to write a C++ program to do the following: Ask the user to enter the length and width of a rectangle and read them. Ask the user to enter a displacement number indicating the position of the rectangle from the left side of the screen and read it. Ask the user to enter a fill character that will be used to fill the rectangle and read it. Display the rectangle according to the entered specification. A sample execution of the program is shown below: Enther the length and width of rectangle: 4 8 Enter the rectangle displacement: 10 Enter the fill character: * ******** ******** ******** ******** Press any key to continue Enther the length and width of rectangle: 5 5 Enter the rectangle displacement: 20 Enter the fill character: 0 00000 00000 00000 00000 00000 Press any key to continue - .
You are required to write a C++ program to do the following: Ask the user to enter the length and width of a rectangle and read them. Ask the user to enter a displacement number indicating the position of the rectangle from the left side of the screen and read it. Ask the user to enter a fill character that will be used to fill the rectangle and read it. Display the rectangle according to the entered specification. A sample execution of the program is shown below: Enther the length and width of rectangle: 4 8 Enter the rectangle displacement: 10 Enter the fill character: * ******** ******** ******** ******** Press any key to continue Enther the length and width of rectangle: 5 5 Enter the rectangle displacement: 20 Enter the fill character: 0 00000 00000 00000 00000 00000 Press any key to continue - .
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter9: Completing The Basics
Section9.5: Input Data Validation
Problem 1E
Related questions
Question
100%
Problem 23 - Looping Statements
C++ program pls
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning