This is a program that I created based on an exercise that I had to hand in for my c++ class in school.
My exercise asks me to write a program that displays the following menu: Geometry Calculator:
- Calculate the area of a circle
- calculate the area of a rectangular
- calculate the area of a triangle
- quit
Enter your choice (1-4)
- if the user enters 1, then the program should ask for the radius of the circle and then should display the area. use 3.14159 for PI.
- if the user enters 2, then the program should ask for the width and length of the rectangle and then should display the area.
- if the user enters 3, then the program should ask for the length of the triangle base and its height and then should display the area.
- if the user enters 4, then the program should quit.
-
Copy and paste the code in the compiler and run it.
-
it should help you find the area of a circle, rectangle, and triangle
- Feel free to copy paste and hand it to your professor, il add in another file the pseudo code in case he asks for it.
To be honest, I really didn't enjoy doing this exercise it was boring and it took me precious hours of time that I could have enjoyed playing with my dog.
But on the other hand, it improved my conditional statement skills and helped me understand more about input validation.
I hope this program will help you get an A++ on your class or it can help you find the area of your coffee mug