#include<stdio.h>
#include<math.h>
int main()
{
float base,exp;
int i;
printf("Please input the base:\n ");
scanf("%f",&base);
printf("Please input the power:\n ");
scanf("%f",&exp);
for(i=0;i<5;i++)
{
printf("%.3f^%.3f is %.5f\n",base,exp,pow(base,exp));
exp+=1;
}
printf("\n");
return 0;
}
求任意数的幂
最新推荐文章于 2021-04-08 18:17:28 发布