Home >>VB.Net Programs >VB.Net program to find the angle for specified tangent value

VB.Net program to find the angle for specified tangent value

Write a VB.Net program to find the angle for specified tangent value

The angle for the defined tangent value will be listed here, and the angle values for different tangent values will be printed.

Program :

The source code for finding the angle for the tangent value defined is given below. The program given is compiled and successfully executed.

Example


Module Module1

    Sub Main()
        Dim angle As Double = 0

        angle = Math.Atan(2)
        Console.WriteLine("Angle of specified tangent value is: {0}", angle)

        angle = Math.Atan(0.3584)
        Console.WriteLine("Angle of specified tangent value is: {0}", angle)

        angle = Math.Atan(0.0)
        Console.WriteLine("Angle of specified tangent value is: {0}", angle)
    End Sub
    
End Module
	
Output:
Angle of specified tangent value is: 1.10714871779409
Angle of specified tangent value is: 0.344138428307805
Angle of specified tangent value is: 0

Explanation:

We created a Module1 module in the program above that contains the Main() method. We created a variable angle initialized with 0 in the Main() method.

angle = Math.Atan(2)
Console.WriteLine("Angle of specified tangent value is: {0}", angle)

angle = Math.Atan(0.3584)
Console.WriteLine("Angle of specified tangent value is: {0}", angle)

angle = Math.Atan(0.0)
Console.WriteLine("Angle of specified tangent value is: {0}", angle)

We find the angle against the defined tangent values in the above code and then print them out on the console screen.


No Sidebar ads