Home »
VB.Net »
VB.Net Programs
VB.Net program to demonstrate the Math.Exp() method
By Nidhi Last Updated : November 11, 2024
Math.Exp() method in VB.Net
Here, we will demonstrate the Exp() method of Math class that will return e raised to the specific power.
VB.Net code to demonstrate the Math.Exp() method
The source code to demonstrate the Math.Exp() method is given below. The given program is compiled and executed successfully.
'VB.Net program to demonstrate Math.Exp() method.
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
Output:
OUTPUT
Enter the number: 10
Result : 22026.4657948067
Press any key to continue . . .
Explanation:
In the above program, we created a variable num, which is initialized with 0. After that, we read the value of num from the user.
Console.WriteLine("Result : {0}", Math.Exp(num))
In the above method, we used Exp() method of Math class that will return e raised to the specific power.
VB.Net Basic Programs »