How to calculate an angle of a right triangle given opposite and hypotenuse in VB.NET

1 Answer

0 votes
Imports System
				
Public Module Module1
	Public Sub Main()
		Dim opposite As Double = 2.5
		Dim hypotenuse As Double = 5
  
		Dim angle_sin As Double = opposite / hypotenuse
		Dim right_triangle_angle  As Double = Math.Asin(angle_sin) * 180 / Math.PI
  
		Console.Write("Right Triangle Angle = " + CStr(right_triangle_angle))
	End Sub
End Module




' run:
'
' Right Triangle Angle = 30
'

 



answered Jul 21, 2021 by avibootz
...