使用点网给定三角形的三个边时如何查找三角形的区域 [英] how to find area of a triangle when its three sides are given using dot net
本文介绍了使用点网给定三角形的三个边时如何查找三角形的区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当使用点net给出三角形的三个边时,如何查找三角形的区域.
how to find area of a triangle when its three sides are given using dot net
推荐答案
2,590万个结果.哇.... ^ ]是您的朋友,您应该经常拜访他.您需要做的是在我提供的列表中找到一个链接,该链接为您提供了算法,然后将其转换为您选择的代码语言.狩猎愉快.
25.9 million results. Wow.... GOOGLE[^] is your friend and you should visit him often. What you need to do is find a link in the list I''ve provided which gives you the algorithm and then convert that into the code language of your choice. Happy hunting.
您应该尝试以下操作:
You should try this:
//Suppose your three sides are a, b & c
private double area(double a, double b, double c){
double s = (a + b + c) / 2;
return Math.Sqrt(s * (s - a) * (s - b) * (s - c));
}
--Amit
--Amit
这篇关于使用点网给定三角形的三个边时如何查找三角形的区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文