C# Program to Convert Meters To Kilometers

In this C# program, we will take the input meters from the user and change it Kilometers.

C# Program to Convert Meters To Kilometers Code:

 private static void Main(string[] args)
        {
            decimal Meter, Kilometer;
            Console.Write("Enter the distance (in meters): ");
            Meter= decimal.Parse(Console.ReadLine());
            Kilometer = Math.Round(Meter / 1000,2);
            Console.WriteLine("{0} meters = {1} Kilometers.", Meter,Kilometer);
            Console.ReadLine();
        }

C# Program to Convert Meters To Kilometers Output:

CSharp-program-to-Convert-Meters-To-Kilometers

 
We are nothing without our users ! You can help us offer even more high quality content. Please share our page !
Best quality Asp .Net Ajax Control Toolkit tutorials.

Give your valuable comments.

Name
Email
Comment
8 + 8 =
 
About Us | Terms of Use | Privacy Policy | Disclaimer | Contact Us Copyright © 2012-2022 CodingFusion
75 Important SQL Server queries you should know