// C program to illustrate
// power function
#include <math.h>
#include <stdio.h>
int main()
{
double x = 6.1, y = 4.8;
// Storing the answer in result.
double result = pow(x, y);
printf("%.2lf", result);
return 0;
}
pow(base, exponent); //must #include <cmath> to use pow()
example:
#include <iostream>
#include <cmath> //must include this library
int main ()
{
int y;
int x =10;
y = pow(x,2); // y = x^2
}