//find the power of a number where the base and power is imputed from keyboard
#include "stdio.h"
#include "math.h"
int main ()
{
int base,expo,result;
printf ("Enter the base and power :\n");
scanf ("%i%i",&base,&expo);
result=pow(base,expo);
printf ("%i to the power %i is %i",base,expo,result);
return 0;
}
output output output
Enter the base and power :
2
4
2 to the power 4 is 16
No comments:
Post a Comment