Question: Write a recursive function power ( base , exponent ) that calculates and returns base - sponent. For example power ( 3 , 4 )

Write a recursive function power(base, exponent) that calculates and returns base-sponent. For example power(3,4)=3*3*3*3. Assume that exponent is an integer greater than or equal to 1. Enter base : 3 Enter exponent : The result of power(3, QP044) is 81 Problem 2(50)2. Write a recursive function Sum(base, erponent) that calculates and returns torent base". For example, Sum(3,4)=31+32+33+34. Assume that exponent is an integer greater than or equal to 1. Enter the base: 18 Enter the exponent : 5 The result of sum(10,5) is 111110 Hint: You can use pow() function in math.h library.

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!