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

VB.Net program to find the hyperbolic cosine

Write a VB.Net program to find the hyperbolic cosine

Here, we can find the hyperbolic cosine of the angle defined and print the result on the screen of the console.

Program :

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

Example


Module Module1
    Sub Main()
        Dim hyperCosine As Double = 0
        hyperCosine = Math.Cosh(2)
        Console.WriteLine("Hyperbolic Cosine is: {0}", hyperCosine)
        hyperCosine = Math.Cosh(0.3584)
        Console.WriteLine("Hyperbolic Cosine is: {0}", hyperCosine)
        hyperCosine = Math.Cosh(0.0)
        Console.WriteLine("Hyperbolic Cosine is: {0}", hyperCosine)
    End Sub
End Module
	
Output:
Hyperbolic Cosine is: 3.76219569108363
Hyperbolic Cosine is: 1.06491571143776
Hyperbolic Cosine is: 1

Explanation:

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

hyperCosine = Math.Cosh(2)
Console.WriteLine("Hyperbolic Cosine is: {0}", hyperCosine)

hyperCosine = Math.Cosh(0.3584)
Console.WriteLine("Hyperbolic Cosine is: {0}", hyperCosine)

hyperCosine = Math.Cosh(0.0)
Console.WriteLine("Hyperbolic Cosine is: {0}", hyperCosine)

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


No Sidebar ads