VB.Net program to find the logarithm value of a specified number
'VB.Net program to find logarithm value
'of a specified number.
Module Module1
Sub Main()
'Find log value with base e
Console.WriteLine("Logarithm value with Base E")
Console.WriteLine(Math.Log(3))
Console.WriteLine(Math.Log(2.34))
Console.WriteLine(Math.Log(-2.56))
'Find log value with specified base.
Console.WriteLine("Logarithm value with specified Base")
Console.WriteLine(Math.Log(3, 1))
Console.WriteLine(Math.Log(2.34, 2))
Console.WriteLine(Math.Log(-2.56, 4))
End Sub
End Module
Output
Logarithm value with Base E
1.09861228866811
0.85015092936961
NaN
Logarithm value with specified Base
NaN
1.22650852980868
NaN
Press any key to continue . . .
Table of Contents