今天学习了如何计算两个平方数的和
#include <stdio.h>
#include <math.h>
int main()
{
float x,y;
printf("Please input x and y:\n");
scanf("%f,%f",&x,&y);
float m=pow(x,2)+pow(y,2);
printf("Result=%.2f\n",m);
return 0;
}
运行结果如下:
Please input x and y:
1.2,3.4
Result=13.00
--------------------------------
Process exited after 12.72 seconds with return value 0
请按任意键继续. . .