# VB.Net, Visual Basic Tutorial – Learn how to Program – Weight Conversion

Write a program that converts kilogram to pounds, ounces, grams, and US tons.

Output:

This Program Converts Kilogram to pounds, ounces, grams, and US tons.
Enter the weight(kilogram/s): 5

********************
5.0 kilogram/s is equivalent to :
11.0231 pound/s
176.36984999999999 ounce/s
5000.0 gram/s
0.0055000000000000005 US ton/s

.

Solution:

Module Module1
Sub Main()
Dim length As Double = 0
Console.WriteLine(“This program converts kilogram to pounds, ounces, grams, and US tons.”)
Console.Write(“Enter the weight(kilogram/s): “)
Console.WriteLine()
Console.WriteLine(“********************”)
Console.WriteLine(length.ToString() & ” kilogram/s is equivalent to :”)
Console.WriteLine((length * 2.20462) & ” pound/s”)
Console.WriteLine((length * 35.27397) & ” ounce/s”)
Console.WriteLine((length * 1000.0) & ” gram/s”)
Console.WriteLine((length * 0.0011) & ” US ton/s”)
End Sub
End Module

This is a free programming tutorial for you.

Check out more VB.Net tutorials on this site.

here’s my github repository for the VBNet codes of this blog:

MoreCodes – VBNet

Feel free to leave some comments. Thank you

—-

—-

# Share the post

VB.Net, Visual Basic Tutorial – Learn how to Program – Weight Conversion

×