Home »
VB.Net »
VB.Net Programs
VB.Net program to find the hyperbolic tangent of the specified angle
By Nidhi Last Updated : November 14, 2024
Finding the hyperbolic tangent of the specified angle
Here, we will find the hyperbolic tangent of the specified angle and print the result on the console screen.
VB.Net code to find the hyperbolic tangent of the specified angle
The source code to find the hyperbolic tangent of the specified angle is given below. The given program is compiled and executed successfully.
'VB.Net program to find the hyperbolic tangent
'of the specified angle.
Module Module1
Sub Main()
Dim hyperTangent As Double = 0
hyperTangent = Math.Tanh(2)
Console.WriteLine("Hyperbolic Tangent is: {0}", hyperTangent)
hyperTangent = Math.Tanh(0.3584)
Console.WriteLine("Hyperbolic Tangent is: {0}", hyperTangent)
hyperTangent = Math.Tanh(0.0)
Console.WriteLine("Hyperbolic Tangent is: {0}", hyperTangent)
End Sub
End Module
Output:
Hyperbolic Tangent is: 0.964027580075817
Hyperbolic Tangent is: 0.343803932846983
Hyperbolic Tangent 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 hyperTangent initialized with 0.
hyperTangent = Math.Tanh(2)
Console.WriteLine("Hyperbolic Tangent is: {0}", hyperTangent)
hyperTangent = Math.Tanh(0.3584)
Console.WriteLine("Hyperbolic Tangent is: {0}", hyperTangent)
hyperTangent = Math.Tanh(0.0)
Console.WriteLine("Hyperbolic Tangent is: {0}", hyperTangent)
In the above code, we find the hyperbolic tangent of the specified angle values and then printed them on the console screen.
VB.Net Basic Programs »