文章

150

粉丝

0

获赞

558

访问

23.2k

头像
求三角形的面积 题解:
P1125 兰州大学/西北工业大学机试题
发布于2026年1月28日 20:06
阅读数 189

#include<bits/stdc++.h>
using namespace std;
int main(){
	double a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double S;
		S = fabs(a*(d-f)+c*(f-b)+e*(b-d))*0.5;
		cout << fixed <<setprecision(2) << S << endl;
	}	
	return 0;
}

 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发