Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hello, i need this to be done using nested if statments not using while loop please? Write a program that displays the following menu in

image text in transcribed

hello, i need this to be done using nested if statments not using while loop please?

Write a program that displays the following menu in a nicely formatted way (pay attention to the indentations of the menu choices and empty space lines to make the menu more readable by the user) Geometry Calculator 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 of the circle and then display its area. Use 3.14159 for n. the user enters 2, the program should ask for the length and wdth of the rectangle, and then display the rectan es area. . If the user enters 3, the program should ask for the length of the triangle's base and its height, and then display its area If the user enters 4, the program should end. Make sure to do Input Validation for the menu choice, that is the program should print an Error Message to the user for illegal integer menu choice. For example, when the user enters a menu choice outside 1-4 range such as 0 or 5, the program should print a message stating that the choice is not valid. (Hint and Reference: Study Section 4.5 Menu-Driven Programs and Program 4-10 in the textbook) Before you start writing your program, you will first write a sections. Consider how you will add test cases to your pseudo code to test your code so that as a programmer you will gain confidence on your it can runs correctly for the valid and invalid menu choices detailed pseudo code algorithm for the given task inside the Word document with the following

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David J. Auer

3rd Edition

0131986252, 978-0131986251

More Books

Students also viewed these Databases questions