ajahjahah @ 2020-07-22 18:30:22
我的代码↓
#include<bits/stdc++.h>
using namespace std;
int dis(int x1,int x2,int y1,int y2){
return sqrt(pow((x1-x2),2)+pow((y1-y2),2));
}
int main(){
int x1,x2,x3,y1,y2,y3;
float sum;
scanf("%d%d%d%d%d",&x1,&y1,&x2,&y2,&x3,&y3);
sum=dis(x1,x2,y1,y2)+dis(x1,x3,y1,y3)+dis(x2,x3,y2,y3);
printf("%.2f",sum);
}
by ajahjahah @ 2020-07-23 08:48:43
谢谢了