#include <stdio.h>
#include <math.h>
main()
{
float a,b;
scanf("%f%f",&a,&b);
printf("a=%.1f, b=%.1f, a^b=%.1f\n",a,b,pow(a,b));
}
C语言——使用pow()函数求幂函数a的b次方
最新推荐文章于 2024-06-28 17:19:51 发布
#include <stdio.h>
#include <math.h>
main()
{
float a,b;
scanf("%f%f",&a,&b);
printf("a=%.1f, b=%.1f, a^b=%.1f\n",a,b,pow(a,b));
}