1,要加入头文件 math.h
2,pow(x,y);//其作用是计算x的y次方。x、y及函数值都是double型
#include <stdio.h> #include <math.h> int main(){ double x,y; scanf("%lf%lf",&x,&y); printf("%lf",pow(x,y)); return 0; }
1,要加入头文件 math.h
2,pow(x,y);//其作用是计算x的y次方。x、y及函数值都是double型
#include <stdio.h> #include <math.h> int main(){ double x,y; scanf("%lf%lf",&x,&y); printf("%lf",pow(x,y)); return 0; }