Page

C Program to use of pow function

#include <stdio.h>
#include <conio.h>
#include <math.h>

int main()
{
  double c, d, result;

  printf("Enter c and d to calculate c^d\n");
  scanf("%lf%lf", &c, &d);

  result = pow(c, d);

  printf("%.2lf raised to %.2lf = %.2lf\n", c, d, result);

  return 0;
}

No comments:

Post a Comment