Make your own power function in C Language

Make your own power function in C Language: this is a c program for find out maximum no in two no, we use function like this and call in main function also define as a 

#include<stdio.h>

#include<conio.h>

#include<math.h>               //To use inbuilt function like square,square-root , etc

int power(int n,int r);          // Declaration of function

int main()

{                   int n,r,x;

printf(“Enter the number & coefficient of power:”);

scanf(“%d %d”,&n,&r);

x= power(n,r);

printf(“%d”,x);

return 0;

}

int power(int n, int r)

{                  int p;

p= power(n,r);

return p;

}

Output

You may also like...

Leave a Reply