为什么0封????
查看原帖
为什么0封????
1436267
I_Love_Codm楼主2024/9/21 23:53
#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;

double howfar(int x1, int x2, int y1, int y2){
	return sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
}

int main(){
	int a, b;
	cin >> a >> b;
	int c, d;
	cin >> c >> d;
	int e, f;
	cin >> e >> f;
	
	cout  << fixed << setprecision(3)<< howfar(a, c, b, d) + howfar(a, e, b, f) + howfar(c, e, d, f);
	return 0;
}
2024/9/21 23:53
加载中...