Back to course home
0% completed
Vote For New Content
19. Pow(x,n)
Problem Statement
Write a Recursive Approach to Calculate Power of Integer to N Pow(x,n).
Given an integer x and an integer n, write a recursive function to calculate the power of x to the nth power.
Example
| Sr# | x | n | Output | Description |
|---|---|---|---|---|
| 1 | 2 | 5 | 32 | 2 raised to the power of 5 equals 32. |
| 2 | 3 | 4 | 81 | 3 raised to the power of 4 equals 81. |
.....
.....
.....
Like the course? Get enrolled and start learning!