作业帮 > 数学 > 作业

Given 2 sides of a right triangle,calculate:

来源:学生作业帮 编辑:大师作文网作业帮 分类:数学作业 时间:2024/09/23 14:34:41
Given 2 sides of a right triangle,calculate:
The hypotenuse of the triangle.
Each of the angles of the triangle
The area of the triangle
You must:
Reference the math library.
Declare the necessary symbolic constants (hint:PI,but there may be more).
Format floating point output.
Given 2 sides of a right triangle,calculate:
给了俩直角三角形的直角边,设为a,b,要你计算:
三角形的斜边c=根号(a^2+b^2)--------勾股定理
三角形每个的角度,90度的直角边就不用说了,a边对的角θ可以得出三角函数tanθ=a/b,通过查表可得到θ的角度,b边对的角即180-90-θ
三角形的面积S=a*b/2 面积公式,不再赘述