#include <stdio.h>
double power(double a, int b){
if(b == 0)
return 1;
else
return a * power(a, b - 1);
}
int main(void){
double a;
int b;
scanf("%lf", &a);
scanf("%d", &b);
printf("A potência (%.2lf ^ %d) é: %.2f\n", a, b, power(a, b));
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: