ADVERTISEMENT
ADVERTISEMENT

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

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

Program/Source Code:

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 »



ADVERTISEMENT



ADVERTISEMENT



Comments and Discussions


ADVERTISEMENT

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.