(c++) (CodeBlocks) Write a program that uses a loop-driven menu that displays as: Area Calculator…

(c++) (CodeBlocks)

Write a program that uses a loop-driven menu that displays as:

Area Calculator

1. Circle

2. Rectangle

3. Triangle

4. Exit the calculator

If the user enters 1, prompt the user to enter the radius of the circle. Use the formula area = pi * r squared, (use 3.14159 for pi)  Display:

The area of the circle is <calculated value>

If the user enters 2, prompt the user to enter the length and width of the rectangle.  Use the formula area = length * width. Display:

The area of the rectangle is <calculated value>

If the user enters 3, prompt the user to enter the base and height of the triangle.  Use the formula area = base * height * .5. Display:

The area of the triangle is <calculated value>

Run the program 3 times with the test data:

Test data:

first run:

area of a circle, radius 8

second run:

area of a rectangle, length 16, width 8

third run:

area of a triangle, base 8, height 16

Capture the output of your program running into your source code. Submit your source code file.

Needs help with similar assignment?

We are available 24x7 to deliver the best services and assignment ready within 3-4 hours? Order a custom-written, plagiarism-free paper

Get Answer Over WhatsApp Order Paper Now