2774: 计算三角形面积(利用海伦公式) 摘要:```cpp #include #include #include using namespace std; int main() { float x1, y1, x2, y…… 题解列表 2023年11月22日 0 点赞 0 评论 580 浏览 评分:6.0
已知三点求面积 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int main(){ float x1, y1, x2, y2, x3, y3; scanf("%…… 题解列表 2024年02月28日 0 点赞 0 评论 737 浏览 评分:6.0
2774: 计算三角形面积 摘要:```cpp #include #include #include using namespace std; double getBC(double x1,double y1,double …… 题解列表 2023年01月11日 0 点赞 5 评论 639 浏览 评分:6.0
计算三角形面积,海伦公式 摘要:解题思路:海伦公式sprt(p(p-a)(p-b)(p-c)),p为三角形的半周长注意事项:涉及距离计算,最好用双精度变量进行存储参考代码:#include <stdio.h>#include <ma…… 题解列表 2023年02月15日 0 点赞 0 评论 557 浏览 评分:6.0
2774: 计算三角形面积 摘要:解题思路:注意事项:参考代码:import mathx1,y1,x2,y2,x3,y3 = map(float,input().strip().split())a = math.sqrt((x1 - …… 题解列表 2024年01月15日 0 点赞 0 评论 494 浏览 评分:5.3
简单三角形面积c++题解(海伦公式) 摘要:解题思路:我们可以利用海伦公式#a,b,c 是三角形的边长#S 是面积我们可以利用勾股定理,求出边长。注意事项: 我们无法知道那个边是底和高,所以要用海伦公式参考代码:#include <iostre…… 题解列表 2023年01月15日 0 点赞 2 评论 1026 浏览 评分:5.0
感谢支持(谢谢) 摘要:解题思路:#include <bits/stdc++.h>using namespace std;int main(){ double xa,ya,xb,yb,xc,yc; cin>>xa…… 题解列表 2023年04月29日 0 点赞 0 评论 375 浏览 评分:4.0
计算三角形面积 摘要:解题思路:运用求两点间距离公式和海伦公式注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double xa,x…… 题解列表 2023年04月29日 0 点赞 0 评论 389 浏览 评分:2.0
2774: 计算三角形面积 摘要:解题思路:注意事项:接收输入用单精度,运算用双精度(有多次开方运算),避免丢失精度。借助海伦公式,可自行查询,这里不在过多赘述。可直接使用。参考代码:#include<iostream>#…… 题解列表 2026年05月23日 1 点赞 0 评论 65 浏览 评分:0.0
计算三角形面积 摘要:#include <iostream>#include <cmath>#include <iomanip>using namespace std;int main(…… 题解列表 2025年10月23日 0 点赞 0 评论 274 浏览 评分:0.0