C Programming Code Examples C > Recursion Code Examples C Program to find Power of a Number using Recursion C Program to find Power of a Number using Recursion The following C program, using recursion, finds the power of a number. The power of a number is the number multiplied to itself for the number of times it has been raised to Eg: 9^3 is 729 #include <stdio.h> long power (int, int); int main() { int pow, j; long result; printf("Enter a number: "); scanf("%d", &j); printf("Enter it's power: "); scanf("%d", &pow); result = power(j, pow); printf("%d^%d is %ld", j, pow, result); return 0; } long power (int j, int pow) { if (pow) { return (j * power(j, pow - 1)); } return 1; }