Question: 9. Write a program that displays the following menu: Geometry calculator 1- Calculate the area of a Circle 2- Calculate the area of a Square

 9. Write a program that displays the following menu: Geometry calculator

9. Write a program that displays the following menu: Geometry calculator 1- Calculate the area of a Circle 2- Calculate the area of a Square 3- Quit Enter your choice (1 - 3): If the user enters 1, the program should ask for the radius of the circle and then display its area. Use the following formula: area - ter where r is the radius and st = 3.14159. If the user enters 2, the program should ask for the length of the square side and then display its area. If the user enters 3, the program should end. Display an error message if the user enters a number outside the menu. 10. The force of gravity is different for each planet of the nine planets in our solar system. For example, on Pluto, it is only 0.05 times as strong as on Earth. Thus, if you weight 100 pounds (on Earth), you should weight only 5 pounds on Pluto. Write a C++ program that allows you to enter your earth weight and your choice planet to which you would like your weight converted. The output should be your weight on the desired planet together with the planet name, The following table shows the relative forces for gravity for five planets: Planet Earth Jupiter Mercury Neptune Force of Gravity 1.00 2,65 0.38 1.23 Note: The program should accept both lower and upper case letters for the input planet selection (eg E or e for earth). If user inputs invalid choice, an error message should be displayed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!