Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
