2774: 计算三角形面积(利用海伦公式) ```cpp#include#include#includeusingnamespacestd;intmain(){floatx1,y1,x2,y2,x3,y3;cin>>x1>>y1>>x2>>y2>>x3>>y3;doublea=sqrt(pow(x1-x2, 题解列表 2023年11月22日 0 点赞 0 评论 698 浏览 评分:6.0
题解 2774: 计算三角形面积(制作不易,给个好评) 摘要:解题思路:可以先做一下2773,海伦公式:sqrt(p*(p-a)*(p-b)*(p-c)),p=(a+b+c)/2。注意事项:要用双精度浮点,单精度试了就错。参考代码:#include <bits/…… 题解列表 2023年12月03日 0 点赞 0 评论 639 浏览 评分:9.9
计算三角形面积--java语言 解题思路:①根据题目提示,输入x1~y3在内的6个单精度浮点数②了解海伦公式的用法③先根据坐标计算出a,b,c的值,再计算p④最后根据公式计算面积S⑤输出带两位小数的面积注意事项:①导入Scanner②数据类型的转换前期我们输入的是单精度浮点数(float)进过计算后会变为双精度浮点数(double) 题解列表 2023年12月04日 0 点赞 0 评论 666 浏览 评分:9.9
2774: 计算三角形面积 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double x1,y1,x2,y2,x3,y3,a…… 题解列表 2023年12月16日 0 点赞 0 评论 558 浏览 评分:9.9
java--study||O.o 摘要:参考代码:import java.util.Scanner; public class Main { public static void main(String[] args) { …… 题解列表 2024年01月05日 0 点赞 0 评论 545 浏览 评分:9.9
2774: 计算三角形面积 解题思路:注意事项:参考代码:importmathx1,y1,x2,y2,x3,y3=map(float,input().strip().split())a=math.sqrt((x1-x2)**2+(y1-y2)**2)#计算边长b=math.sqrt((x1-x3)**2+(y1-y3)**2)c 题解列表 2024年01月15日 0 点赞 0 评论 589 浏览 评分:5.3
2774: 计算三角形面积 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double x1,y1,x2,y2,x3,y3,a…… 题解列表 2024年01月22日 0 点赞 0 评论 476 浏览 评分:0.0
编写题解 2774: 计算三角形面积 解题思路:注意事项:参考代码:importmathx1,y1,x2,y2,x3,y3=map(float,input().split())a=math.sqrt(math.pow(x1-x2,2)+math.pow(y1-y2,2))b=math.sqrt(math.pow(x2-x3, 题解列表 2024年02月26日 0 点赞 0 评论 582 浏览 评分:0.0
已知三点求面积 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int main(){ float x1, y1, x2, y2, x3, y3; scanf("%…… 题解列表 2024年02月28日 0 点赞 0 评论 845 浏览 评分:6.0
题目 2774: 计算三角形面积 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<math.h> using namespace std; int main() { double x1…… 题解列表 2024年02月28日 0 点赞 0 评论 534 浏览 评分:0.0