In this example, we will write a program to convert kilograms to pounds in C#. On the web you will show this example as C# kg to lbs convertor.
Firstly we should know the ratio of lbs to kg. The following formula shows the lbs ratio of kg.
How to convert Kilograms to Pounds
1 kilogram (kg) is equal to 2.20462262185 pounds (lbs).
1 kg = 2.20462262185 lb
Some of KG to LBS examples
Kilograms (kg) | Pounds (lb) |
1 kg | 2.205 lb |
2 kg | 4.409 lb |
3 kg | 6.614 lb |
4 kg | 8.818 lb |
5 kg | 11.023 lb |
Here is the code how to convert Pounds to Kilograms
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
class Program { static void Main(string[] args) { Console.WriteLine("C# KG to LB program\n"); Console.Write("Enter a number in KG: "); double kilograms = Convert.ToDouble(Console.ReadLine()); double pounds = kilograms * 2.20462262185; Console.WriteLine(kilograms + " kilograms is " + pounds + " pounds"); Console.ReadLine(); } } |
Output: