Question: Language - C This assignment is to create the Exponential Calculator application. Write a recursive function power(base, exponent) that when invoked returns baseerponent For example,
Language - C

This assignment is to create the Exponential Calculator application. Write a recursive function power(base, exponent) that when invoked returns baseerponent For example, power(3,4) 3 *3*3*3 Assume that exponent is an integer greater than or equal to 0 Hint: The recursion step would use the relationship baseexponent - base *baseexponent-1 and the terminating conditions occur when exponent is equal to 0 and 1 because base-base You wil need to use the sentinel-controlled iteration (Develop your program to display the result as the sample shown below) C:Windowslsystem321cmd.exe Welcome to use the exponential Calculator Please ente a base to start or -1 to end the Calculator: 2 Enter an exponent: 3 2 raised to the 3 is 8 Please enter a base or-1 to end the Calculator: 3 Enter an exponent 4 3 raised to the 4 is 81 Please enter a base or -1 to end the Calculator: 4 Enter an exponent: 1 4 raised to the 1 is 4 Please enter a base or-1 to end the Calculator: 5 Enter an exponent: 0 raised to the is 1 Please ente a base or-1 to end the Calculator:-2 Enter an exponent: 3 2 raised to the 3 is-8 Please enter a base or -1 to end the Calculator: -1 Press any key to continue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
