Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Your project leader gives you a picture which shows two rotated full pyramids with their heads connected with each other, and your leader wants

C++

Your project leader gives you a picture which shows two rotated full pyramids

with their heads connected with each other, and your leader wants you to write a

program to draw this figure. Your program will read the height of this graph from

console in a validation loop. The validation loop continues to prompt the user for

an integer as long as the integer is an even or its value is less than 0 or bigger than

20. Once an odd integer at the range of (5, 19) is entered, draw the given graph

line by line in a loop:

Notice: The width of the graph should always equal to height+1.

The output should look like this:

image text in transcribed

Page > of 2 ZOOM+ 1) Your project leader gi with their heads connecte o rotated full pyramids wants you to write a Press Esc to exit full screen program to draw this figure. Your program will read the height of this graph from TO console in a validation loop. The validation loop continues to prompt the user for an integer as long as the integer is an even or its value is less than 0 or bigger than 20. Once an odd integer at the range of (5, 19) is entered, draw the given graph line by line in a loop Notice: The width of the graph should always equal to height 1 The output should look like this Please type in the height of the graph: 12 Invalid height.Please pick another value 13 your program code here]* If possible, format your code like this: Font "Courier New" Font size 9 Bold

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions