Algorithms_in_C
1.0.0
Set of algorithms implemented in C.
|
Program to calculate exponentiation using recursion algorithm. More...
#include <assert.h>
Functions | |
long | power (int a, int b) |
Returns the value of the first argument raised to the power of the second argument using recursion. More... | |
static void | test () |
Test function. More... | |
int | main () |
Driver Code. More... | |
Program to calculate exponentiation using recursion algorithm.
int main | ( | void | ) |
Driver Code.
long power | ( | int | a, |
int | b | ||
) |
Returns the value of the first argument raised to the power of the second argument using recursion.
a | the base. |
b | the exponent. |