Question: Let n and b be nonnegative integers. The exponent bn is computed by multiplying b by b , n times. Write a program that asks

Let n and bbe nonnegative integers. The exponent bn is computed by multiplying b by b, n times. Write a program that asks the user for the base and exponent and uses a loop to perform thecalculation. Display the result and allow the user to repeat the program.
Example: If the user enters a 3 for the base and 4 for the exponent, then your program should perform answer =3*3*3*3=81. Then 81 will 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 Programming Questions!