关于sqrt命令
#include <stdio.h>#include <math.h>
main()
{
float x1,x2,y1,y2,s;
scanf("%f%f%f%f",&x1,&x2,&y1,&y2);
printf("A(%f,%f),B(%f,%f)\n",x1,x2,y1,y2);
s=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
printf("s=%f\n",s);
}
我输入x1=2.0,x2=1.0,y1=5.0,y2=2.0
我自己算的s=100.000000
可计算机的显示是3.167728
是我S算错了还是计算出错了```?