Question: write a c++ program. Your brother / sister is currently taking a geometry class. They would like you to create a program that they can
write a c++ program. Your brother / sister is currently taking a geometry class. They would like you to create a program that they can use to verify calculations. Specifically, they want the program to calculate the area of a square, rectangle, parallelogram, circle, and triangle. Write a program that enters a numeric code that represents the type of area calculation to perform. A code of 1 represents a square, 2 is a rectangle, 3 is a parallelogram, 4 is a circle, and 5 is a triangle. The program will also need to enter the dimensions of the shape. The program should calculate the area of the shape. It should also display the name of the shape (Square, Rectangle, and so on) and the area a. Execute the program four times, using the following data: (1) A square side measurement of 4, (2) A rectangle length of 5 and width of 3, (3) A parallelogram base of 3 and height of 4, (4) An invalid shape with a number other than 1-5. b. Save the program as lab3ifsh.cpp. c. For this program, hand in: in the case and break.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
