Question: The program will introduce the use of if-statements, and plan out the steps for it We need to have a program that will let the

The program will introduce the use of if-statements, and plan out the steps for it

We need to have a program that will let the user enter a base value and an exponent value.

They will pick from a menu to let the program which of the 5 choices they want to test

We are going to get to use a built-in Math function to make this program work pow().

You will only be able to use the pow() function with a positive integer exponent with the choice that has a fractional exponent.

No negative base values will be entered along with a fractional exponent. But for the other scenarios the base can be a negative number.

Your program must let the user test each choice from menu without having to restart the program.

The output must look similar to the following:

The base 6.35 raised to the power of 3/4 is 4.0001869986.

My question is how would you make the program using switch statements and have the option for the user to choose how many times they want to run the program. Label (comment) a top of each statement and what parts of the program is doing.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a plan outlining how to implement the program using switch statements and allowing the user to choose how many times they want to run the progra... View full answer

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 Programming Questions!