Home >>VB.Net Programs >VB.Net program to demonstrate the Math.Exp() method
Here, we will demonstrate the Math class Exp() method that will return the e raised to the specific power.
Program :
Below is the source code for demonstrating the Math.Exp() method. The program given is compiled and successfully executed.
Example
Module Module1
Sub Main()
Dim num As Integer = 0
Console.Write("Enter the number: ")
num = Integer.Parse(Console.ReadLine())
Console.WriteLine("Result : {0}", Math.Exp(num))
End Sub
End Module
Explanation:
We have created a variable num in the above program, which is initialized with 0. After that, we read from the user the value of the num.
Console.WriteLine("Result : {0}", Math.Exp(num))
In the above case, we used the Math class Exp() method that will return the e raised to the specific power.