pow function returns x raise to the power y where x and y are variables of double data type.
Declaration :- double pow(double, double);
#include <stdio.h> #include <math.h> int main() { double a, b, result; printf("Enter a and b to calculate a^b\n"); scanf("%lf%lf", &a, &b); result = pow(a, b); printf("%.2lf raised to %.2lf = %.2lf\n", a, b, result); return 0; }
