Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ Printing Shapes Create a program that: 1. Prompt the user to choose between a rectangle and a triangle 2. Prompt user for shape parameters

c++ Printing Shapes Create a program that: 1. Prompt the user to choose between a rectangle and a triangle 2. Prompt user for shape parameters a) Rectangle Ask user to choose between supplying a word or a width Ask user for height b) Triangle Ask user to choose between supplying a word or a width, and whether the triangle points up or down Read input 3. Ask the user whether they want to print to a file, myshape.txt, or to cout 4. Print the desired shape 5. Ask the user if they would like to exit, or return to step 1 Any input requested from the user should only be one character in length per decision. 
Functions provided as reference; you do NOT need to use functions in this program, although it is allowed. //void DrawRectangle(int width, int height); //DrawRectangle(5,3) ***** ***** ***** //void DrawRectangle(string word, int height); //DrawRectangle("VOTE", 3) shape.txt: VOTE VOTE VOTE //void DrawTriangle(int size, bool pointingUp); //DrawTriangle(4, true) * ** *** **** //void DrawTriangle(string word, bool pointingUp); //DrawTriangle("VOTE", false) VOTE OTE TE E //DrawTriangle("VOTE", true) E TE OTE VOTE 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions