题目 2774: 计算三角形面积 摘要:解题思路:两个公式 三角形面积s=(p*(p-a)*(p-b)*(p-c))开根号 其中a,b,c为三角形三条边,其中p=(a+b+c)/2注意事项:注意数据类型,还有输出的面积保留的小数位数参考代…… 题解列表 2024年02月29日 0 点赞 0 评论 298 浏览 评分:9.9
编写题解 2774: 计算三角形面积(java) 摘要:解题思路:考虑到可能存在有的三角形不规则,三角形的高不是那么好找,我们可以用海伦公式来求解注意事项:用double 类型的数据参考代码:import java.util.Scanner; pub…… 题解列表 2024年04月06日 0 点赞 0 评论 232 浏览 评分:9.9
计算三角形面积(超标准答案) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<math.h> double distance(float x1, float y1, float x2, fl…… 题解列表 2024年08月02日 1 点赞 0 评论 417 浏览 评分:9.9
2774: 计算三角形面积(把公式记错了) 摘要:```cpp #include #include int main() { double p; double S; double a,b,c; double x1,x2,x3,…… 题解列表 2022年12月30日 0 点赞 0 评论 476 浏览 评分:9.6
编写题解 2774: 计算三角形面积 摘要:解题思路:注意事项: 定义成double类型是全对,定义成float类型是64分,所以要用double类型。参考代码:#include<stdio.h>#include<math.h>int main…… 题解列表 2022年12月12日 0 点赞 0 评论 351 浏览 评分:9.5
2774: 计算三角形面积 摘要:解题思路:注意事项:参考代码:import mathx1,y1,x2,y2,x3,y3 = map(float,input().strip().split())a = math.sqrt((x1 - …… 题解列表 2022年11月26日 0 点赞 0 评论 590 浏览 评分:9.3
计算三角形面积 摘要: ```c #include #include int main() {…… 题解列表 2023年07月22日 0 点赞 0 评论 364 浏览 评分:9.0
计算三角形面积 摘要:#include<stdio.h>#include<math.h> //主要是用pow函数double changdu(double x1,double x2,double y1,double y2)…… 题解列表 2024年08月31日 0 点赞 0 评论 147 浏览 评分:8.0
计算三角形面积 摘要:解题思路:海伦公式S=1/4√(a+b+c)(a+b-c)(a+c-b)(b+c-a)注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ …… 题解列表 2022年11月11日 0 点赞 0 评论 540 浏览 评分:8.0
2774: 计算三角形面积(利用海伦公式) 摘要:```cpp #include #include #include using namespace std; int main() { float x1, y1, x2, y…… 题解列表 2023年11月22日 0 点赞 0 评论 334 浏览 评分:6.0