求三角形面积 题解:
P5111
发布于2026年3月28日 01:20
阅读数 368
#include<bits/stdc++.h>
using namespace std;
int main(){
int x1,y1,x2,y2,x3,y3;
while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3){
double res;
res = 0.5*fabs((x2-x1)*(y3-y1)-(y2-y1)*(x3-x1));
printf("%.2f\n",res);
}
}
为什么不通过呀家人们
登录后发布评论
暂无评论,来抢沙发