Home >>VB.Net Programs >VB.Net program to find the sine value for the specified angle
Here, for the defined angle, we can find the sine value and print the result on the console screen.
Program :
Below is the source code for finding the sine value for the specified angle. The program given is compiled and successfully executed.
Example
Module Module1
Sub Main()
Dim sine As Double = 0
sine = Math.Sin(2)
Console.WriteLine("Sine is: {0}", sine)
sine = Math.Sin(0.3584)
Console.WriteLine("Sine is: {0}", sine)
sine = Math.Sin(0.0)
Console.WriteLine("Sine is: {0}", sine)
End Sub
End Module
Explanation:
We created a Module1 module in the program above that contains the Main() method. We created a variable sine initialized with 0 in the Main() method.
sine = Math.Sin(2) Console.WriteLine("Sine is: {0}", sine) sine = Math.Sin(0.3584) Console.WriteLine("Sine is: {0}", sine) sine = Math.Sin(0.0) Console.WriteLine("Sine is: {0}", sine)
Here, for the specified angle values, we find the sine value and then print it on the console screen.