Question: The problem of raising an integer x to an integer power n where n 0 can be expressed as follows: x = x*x-1 x=1

The problem of raising an integer x to an integer power n where n 0 can be expressed as follows: x" = x*x"-1 x"=1 if n > 0 if n = 0 a) Write a recursive function power that computes the nth power of a given integer x. The function prototype is given as: int powerR(int x, int n); b) Write a complete C program to test the recursive function that you have written in Part (a). Prompt the user for x and n values.
Step by Step Solution
There are 3 Steps involved in it
Solution Part a Recursive Function powerR The recursive function powerR computes the nth power of a ... View full answer
Get step-by-step solutions from verified subject matter experts
