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: