成功地编译失败,悬棺
查看原帖
成功地编译失败,悬棺
1390743
_mei_tou_nao_楼主2024/8/19 13:28
using namespace std;
double a, b, c, d, x1, y1, x2, y2, x3, y3;

int main() {
	cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
	a = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
	b = sqrt(pow(x3 - x1, 2) + pow(y3 - y1, 2));
	c = sqrt(pow(x3 - x2, 2) + pow(y3 - y2, 2));
	d = a + b + c;
	cout << fixed << setprecision(2) << d;
	return 0;
}
2024/8/19 13:28
加载中...