杭电2001.为什么是wrong answer?
#include<stdio.h>#include<math.h>main(){floatx1,x2,y1,y2;while(scanf("%f%f%f%f",&x1,&...
#include<stdio.h>
#include<math.h>
main()
{
float x1,x2,y1,y2;
while(scanf("%f %f %f %f",&x1,&x2,&y1,&y2)!=EOF)
{
printf("%.2f",sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)));
putchar('\n');
}
} 展开
#include<math.h>
main()
{
float x1,x2,y1,y2;
while(scanf("%f %f %f %f",&x1,&x2,&y1,&y2)!=EOF)
{
printf("%.2f",sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)));
putchar('\n');
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询