Home »
VB.Net »
VB.Net Programs
VB.Net program to find the sine value for the specified angle
By Nidhi Last Updated : November 15, 2024
Finding the sine value for the specified angle
Here, we will find the sine value for the specified angle and print the result on the console screen.
VB.Net code to find the sine value for the specified angle
The source code to find the sine value for the specified angle is given below. The given program is compiled and executed successfully.
'VB.Net program to find the sine of
'the specified angle.
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
Output:
Sine is: 0.909297426825682
Sine is: 0.350776348085188
Sine is: 0
Press any key to continue . . .
Explanation:
In the above program, we created a module Module1 that contains the Main() method. In the Main() method we created a variable sine initialized with 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)
Here, we find the sine value for the specified angle values and then printed them on the console screen.
VB.Net Basic Programs »