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

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

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

Here, the angle for the specified sine value is found and the angle values for the various sine values are print out.

Program :

Below is the source code for determining the angle for the specified sine value. The program given is compiled and successfully executed.

Example


Module Module1

    Sub Main()
        Dim angle As Double= 0

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

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

        angle = Math.Asin(0.0)
        Console.WriteLine("Angle of specified sine value is: {0}", angle)
    End Sub

End Module
	
Output:
Angle of specified sine value is: NaN
Angle of specified sine value is: 0.366553473829125
Angle of specified sine value is: 0

Explanation:

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

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

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

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

We find the angle against the specified sine values in the above code, and then print them on the console screen.


No Sidebar ads