Write a program using recursion to find power of a number
We can write, nm = n*nm-1 =n*n*nm-2 =n*n*n*……………m times *nm-m The program which implements the above logic is as follows: #include<stdio.h> int power(int,int); void main() { int n,m,k; printf(“Enter the value of n and m”); scanf(“%d%d”,&n,&m); k=power(n,m); printf(“The value of nm for n=%d and m=%d is %d”,n,m,k); } int power(int x, int y) { if(y==0) […]


