Question: how to draw the triangle Program Purpose Using Visual Studio 2017 create a CLR console application. Create a program plan and then convert it into
how to draw the triangle


Program Purpose Using Visual Studio 2017 create a CLR console application. Create a program plan and then convert it into C++ statements. Practice debugging, declaring variables, formatting output, decision statements, input/output, loops, and functions Always bring to class 1. Gaddis' book, How-to handouts from Canvas and your class notes 2. This assignment sheet & the grade sheet for this lab already printed out. 3. USB Flash drive(s) or other storage media. Mandatory Instructions Write a complete C++ program for the following program description. In this lab, you will draw a number of rectangles depending on user input utilizing a function that you will write Draw rectangles using a function called draw _rectangle(). The draw rectangle() function should draw (i.c., output t console window) ONE four (rows) x seven (columns) rectangle (i.c., rectangle that is empty inside). Implement th drawing by utilizing a nested loop and symbol. In the main function, your program should ask the user to enter the number of times the rectangle is to be displayed an then call the draw rectangle() function that specific number of times to draw the rectangle(s). Validate user input. D not accept "hello" for input of times to repeat the shape. Do not accept any numeric value less than 1 or greater than 10 This needs to be implemented with two nested do while loops. Assume user will enter a number or they could enter word like "hello" but no mixed input will be entered like "12hello" You program must include the function prototvpe and function definition for the draw_rectangle() function. Output Example Enter the nunber of times you want to draw the rectangle: 3 Optional Instructions Modify your program so that it also displays triangles in addition to rectangles. Let the user select which shape they want. You will ask the user for the shape and then for how many of the selected shape to draw (code you already have from the required portion). Assume user will provide data type you asked for, i.e., char/int/string. Validate user input, i.e., if'T, is for triangle and R' is for rectangle and user enters X' you should not accept this as valid input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
