C++
Write a program that displays the follow menu:
Geometry Calculator
  1. Calculate the Area of a Circle
2. Calculate the Area of a Rectangle
  3. Calculate the Area of a Triangle
4. Quit
Enter your choice (1-4):
If the user enters 1, the program should ask for the radius ofthe circle then display it's area using the following formula: area= PIr2 Use 3,14159 for PI and the radius of the circlefor r. If the user enters 2, the program should ask for the lengthand width of the rectangle, then display the rectangle's area. Usethe following formula: area = length * width
If the user enters 3, the program should ask for the length ofthe triangle's base and it's height, the display its area. Use thefollow formula: area = base * height * .5
If the user enters 4, the program should end.
Input Validation: Display an error message if the user enters anumber outside the range of 1 through 4 when selecting an item fromthe menu. Do not accept negative values for the circle's radius,the rectangle's length or width, or the triangle's base orheight. Â
You can use either if/then/else or the switch statement to buildyour menu.
For extra credit on this assignment, make each of the 3calculations function calls. This is not required to get fullpoints on the assignment, only if you would like extra credit andextra practice writing modular programs with functions.