Home >>C Math Functions >C math pow() function
The C math pow() function is used to return the given input argument x raised to the given power of y. It takes two arguments (base value and power value) and returns the power raised to the base number. This function is defined in math.h header file.
Syntax:double pow(double x, double y)
Parameter | Description |
---|---|
x | It is the floating point base value. |
y | It is the floating point power value. |
#include <stdio.h>
#include <math.h>
int main ()
{
printf("Value 8.0 ^ 3 = %lf\n", pow(8.0, 3));
return(0);
}
#include <stdio.h>
#include <math.h>
int main ()
{
printf("Value 8.0 ^ 3 = %lf\n", pow(9.6, 5));
return(0);
}