pow function

pow function returns x raise to the power y where x and y are variables of double data type.

Declaration :- double pow(double, double);

C programming code for pow

#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;
}
AttachmentSize
pow.png4.49 KB
POW.C271 bytes
Compiler used: 
GCC
Output of program: 
pow function
randomness