Search This Blog

Thursday, June 27, 2019

Write a c program to calculate the value of a raised to b using function pow(a,b)

#include<stdio.h>
#include<math.h>
int main()
{
int s;
float a,b;
printf("Enter the value of a\n");
printf("Enter the value of b\n");
scanf("%f",&a);
scanf("%f",&b);
s=pow(a,b);
printf("power=%d",s);
return 0;
}

No comments:

Post a Comment

Wap in c to print the factorial of a number

 #include<stdio.h> int main() { int i,f=1; printf("Enter a number\n"); scanf("%d",&n); for(i=0;i<n;i++) { f...