1#include <stdio.h>
2#include <math.h>
3
4int main()
5{
6 double base, power, result;
7
8 printf("Enter the base number: ");
9 scanf("%lf", &base);
10
11 printf("Enter the power raised: ");
12 scanf("%lf",&power);
13
14 result = pow(base,power);
15
16 printf("%.1lf^%.1lf = %.2lf", base, power, result);
17
18 return 0;
19}
1The function pow() is used to calculate the power raised
2to the base value. It takes two arguments. It returns the
3power raised to the base value. It is declared in
4“math.h” header file.