Home >>VB.Net Programs >VB.Net program to find the hyperbolic tangent

VB.Net program to find the hyperbolic tangent

Write a VB.Net program to find the hyperbolic tangent

Here, the hyperbolic tangent of the angle defined will be found and the result will be printed on the console screen.

Program :

Below is the source code for finding the hyperbolic tangent of the angle specified. The program given is compiled and successfully executed.

Example


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

Explanation:

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

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)

The hyperbolic tangents of the defined angle values are contained in the above code and then printed on the console screen.


No Sidebar ads