#include<stdio.h>
#include<math.h>
int main(){
float x,y;
printf("Please input x and y:\n");
scanf("%f,%f",&x,&y);
printf("Result=%.2f\n",pow(x,2)+pow(y,2));
return 0;
}
从键盘读入两个实数,编程计算并输出它们的平方和,要求使用数学函数pow(x,y)计算平方值,输出结果保留2位小数。
2021/12/16 8:20:16
