zhangxn @ 2020-07-27 18:12:24
#include<iostream>
#include<cstdio>
#include<cctype>
#include<string>
#include<cmath>
using namespace std;
double dis(int a,int b,int m,int n) {
return sqrt(pow(a-m,2)+pow(b-n,2));
}
double a,b,c,d,e,f;
int main() {
cin>>a>>b>>c>>d>>e>>f;
printf("%.2lf",dis(a,b,c,d)+dis(a,b,e,f)+dis(c,d,e,f));
return 0;
}
by zc_li @ 2020-07-27 18:15:59
函数里面int改double
by zc_li @ 2020-07-27 18:16:53
@zhangxn
by zhangxn @ 2020-07-27 18:17:26
Thanks♪(・ω・)ノ