Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Read Only - You can't save changes to t. 2.3 Write a C++ program that will be used as distance and circumference calculator t(PI) is

image text in transcribed

Read Only - You can't save changes to t. 2.3 Write a C++ program that will be used as distance and circumference calculator t(PI) is a global constant variable of 3.14159. Assume that the distance and circumference are calculated using formulas below: Formula to calculate distance distance (x2 y2) Formula to calculat e circumference circumference x y)2 Whereby, x is a floating number representing x-coordinator and y is a floating number representing y-coordinator. Your program should include the following non-member Return Function name Description 1. void enterInputValues( option, ?? This function should prompt the user to enter option, xCoordinate, ?? xCoordinate) x coordinate and y coordinate. Output the option menu shown in figure 1. X and Y coordinates values can only be entered when option is either 1 or 2. If option is equals to 3, display "Goodbye." and store-1 inside option variable. If option is not either 1, 2 or 3, display "Error, invalid option selected." and store -1 inside option variable. All input values must be returned to the calling function 2. double calcDistCircum(?? option, ? This function will calculate either distance or xCoordinate, ?? xCoordinate) circumference based on the option received. If option is equals to 1, the function calculate and return distance, else the function should calculate and return circumference 3. void displayDistCircum(? Option,?? |This function should display the result with correct result) legend, either: "Distance"result or "Circumference result based on the received Call all the functions created inside this function. Receive input values until option 3 is entered (use loop). YOU CANNOT USE ANY CIN>>AND COUT

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

More Books

Students also viewed these Databases questions

Question

Write an expression for half-life and explain it with a diagram.

Answered: 1 week ago

Question

What do you mean by underwriting of shares ?

Answered: 1 week ago

Question

Define "Rights Issue".

Answered: 1 week ago

Question

Discuss the Rights issue procedure in detail.

Answered: 1 week ago