POW(X,Y) | How to use it | Python Program
pow(x,y):
It is power of variables in mathematical function found in #include<math.h> header file.
Example: 4^2=16
Here, x=4 and y=2.
The function use in as pow(variable,variable);
How to use:
1.First use header file and library file.
2.Then, use function.
Print Power of a number:
code:
#include<stdio.h>
#include<math.h>
void main()
{
int a,b,c;
printf("Enter a integer:\n");
scanf("%d",&a);
printf("Enter the power!:\n");
scanf("%d",&b);
c=pow(a,b);
printf("The result of %d^%d is : %d",a,b,c);
getch();
}
Comments
Post a Comment
Give your feedback!
DO NOT SPAM !!
NO THIRD PARTY PROMOTIONAL LINK !!!! (else comment will be deleted.)