Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please solve this C++ program Assignment 3 Write a C+t program to do the following 1. Function ain a. Calls function DisplayMenue inside a do/while

image text in transcribed

image text in transcribed

please solve this C++ program

Assignment 3 Write a C+t program to do the following 1. Function "ain" a. Calls function "DisplayMenue" inside a do/while to forces the user to input a number between 0 and 4 b. Accepts user's input c. Starts a "while" with sentinel value d. Start a "switch structure that checks the user's input, and accordingly it will call e. At the end of the while with sentinel, call function "DisplayMenue' and forces the necessary functions. the user to input a number between 0 and 4 f. Your program continues looping until the sentinel value is inputted 2. Write function "DisplayMenue" that takes no arguments and return no value. This funct?? displays only the below menu )Circle 2) Sphere 3) Cylinder 4) Calculator 0)Exit Please elect an item: 3. Call function "circle" that takes two double arguments by reference that represents the area and perimeter and returns no value. This function asks the user to input the circle's radius and calculates the area and perimeter, and returns these two values by reference to main. Function "main" ill output these two values. Formulas: Area- Perimeter-2 ? r 4. Call function "Sphere" that takes no argument and returns a double value. This function asks the user to input the sphere's radius, and then it calculates and returns the area to Function "main will output the area. Formula: Area-4RT2 5. Call function "Cylinder that takes two double arguments that represents radius & height and returns no value. This function calculates and prints the cylinder's area and volume Formulas: Area-2 ? r h + 2 ? r- Volume arh 6. Call function Calculator" that takes no arguments and returns an integer value. This function will do the following a. Randomly generates two numbers between 2 and 9, and output them on the screen. b. Asks the user to enter their sum, difference, and product. c. Then, it checks if the user's entered values are cormect d. Ifyes, then it displays a congratulation message. e. If no, then it output the correct answen s). f. Finally, returns to "main' the number of guessed values (i.e. I, 2, or 3)

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

Students also viewed these Databases questions