您的位置:首页 > 其它

题目101 两点距离

2016-07-29 12:45 274 查看


     已AC代码:

#include<cstdio>
#include<cmath>
using namespace std;

int main()
{
int t;
scanf("%d", &t);
while(t--)
{
double x1, y1, x2, y2;
double s;
scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2);
s = sqrt((x1-x2)*(x1-x2) +(y1-y2)*(y1-y2));
printf("%.2lf\n", s);
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  南阳理工OJ