Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

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): “)
length = Double.Parse(Console.ReadLine())
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”)
Console.Read()
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

For more information for Ruby Programming check out Visual Studio

Download the compiler – VB.Net

Feel free to leave some comments. Thank you

—-

Twitter – @MoreCodes

Facebook – https://www.facebook.com/morecodes/

—-

Share the post

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

×

Subscribe to Morecodes | Learn Programming Problems And Solutions In C,c++, Java, D, Vb.net, C#, F#, Ruby, Python

Get updates delivered right to your inbox!

Thank you for your subscription

×