Find a to the power b in C by R4R Team

pow() function in C language are used to find the power of any number.
-It is define in math.h heador file.

Syntax-
pow(a,b);
// it will return the a to the power b.

Example-
pow(2,1) will return 2
pow(2,4) will return 16
pow(2,5) will return 32
pow(2,10) will return 1024
pow(5,0) will return 1
pow(2,0) will return 1
pow(1,1000) will return 1

program-

#include < stdio.h>
#include
int main()
{
int a,b,c;
printf("Enter first number\n");
scanf("%d",&a);
printf("Enter second number\n");
scanf("%d",&b);
c=pow(a,b);
printf("%d to the power %d is %d",a,b,c);
}


output-

Enter first number
3
Enter second number
4
3 to the power 4 is 81




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!