VB.Net program to demonstrate the Math.Log10() method

Here, we are going to demonstrate the Math.Log10() method in VB.Net.
Submitted by Nidhi, on December 02, 2020 [Last updated : February 18, 2023]

Math.Log10() method in VB.Net

Here, we will find the Log 10 value of the specified number using the Log10() method of Math class.

VB.Net code to demonstrate the Math.Log10() method

The source code to demonstrate the Math.Log10() method is given below. The given program is compiled and executed successfully.

'VB.Net program to demonstrate the 
'Math.Log10() method.

Module Module1

    Sub Main()
        'Find log value with base e
        Console.WriteLine("Logarithm values:")
        Console.WriteLine(Math.Log10(3))
        Console.WriteLine(Math.Log10(2.34))
        Console.WriteLine(Math.Log10(-2.56))
    End Sub
    
End Module

Output:

Logarithm values:
0.477121254719662
0.369215857410143
NaN
Press any key to continue . . .

Explanation:

In the above program, we created a module Module1 that contains a method Main(). In the Main() method, we called Log10() method with different specified numbers.

'Find log value with base e
Console.WriteLine("Logarithm values:")
Console.WriteLine(Math.Log10(3))
Console.WriteLine(Math.Log10(2.34))
Console.WriteLine(Math.Log10(-2.56))

Here, we find the log10 value of a specified number and print the result on the console screen.

VB.Net Basic Programs »





Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.