Write a program that draws one of three shapes depending on the user's choice: a square
, a rectangle
or triangle
.
Your program will prompt the user to enter their choice of shape: 's' for square, 'r' for rectangle, and 't' for triangle. If a user enters a character that is not 's', 'r' or 't', the program should display a message indicating that the user’s choice was an incorrect type of shape.
If the user enters a valid choice, your program will prompt the user to enter the size of the shape. This will be the length of the side of the square, both the length of the "across" side and length of the "down" side for the rectangle, or the length of the side of a right triangle.