0分求调!必关!
查看原帖
0分求调!必关!
1633754
Codyma881024楼主2025/8/2 11:41
#include<bits/stdc++.h>
using namespace std;
int dis(double x,double y,double x2,double y2){
	return double(sqrt(pow(x-x2,2)+pow(y-y2,2)));
}
int main(){
	double c=0,x1,y1,x2,y2,x3,y3;
	scanf("%lf %lf\n%lf %lf\n%lf %lf",&x1,&y1,&x2,&y2,&x3,&y3);
	c=dis(x1,y1,x2,y2)+dis(x1,y1,x3,y3)+dis(x2,y2,x3,y3);
	printf("%.2lf",c);
	return 0;
}
2025/8/2 11:41
加载中...