2774:计算三角形面积题解与思路
摘要:解题思路:分两个步骤1.计算三角边长2.通过边长和海伦公式计算面积为了便捷把计算边长和面积过程写成了两个函数为下面的chang和hailun然后带入主体即可求解注意事项:函数为浮点型,为了减少误差除了……
题解 2774: 计算三角形面积(海伦公式)-详解
摘要:解题思路:1.输入部分:使用scanf函数读取三个点的坐标。2.计算三边长度:使用两点间距离公式(x2−x1)2+(y2−y1)2计算三角形的三边长度。……
题目2774:计算三角形面积
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ float x1,y1,x2,y2,x3,y3; dou……
编写题解 2774: 计算三角形面积
摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int main(){ float x1,x2,x3,y1,y2,y3; double a,b……
java-计算三角形面积
摘要:```java
import java.util.Scanner;
public class Main{
public static void main(String[] args){……
计算三角形面积(超标准答案)
摘要:解题思路:注意事项:参考代码:#include<stdio.h>
#include<math.h>
double distance(float x1, float y1, float x2, fl……