Advertisement
Spocoman

01. Convert Meters to Kilometers

Jan 15th, 2022
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConvertMetersToKilometers
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int meters = int.Parse(Console.ReadLine());
  10.  
  11.             Console.WriteLine($"{(decimal)meters/1000:F2}");
  12.     // или: Console.WriteLine($"{meters * 0.001:F2}");
  13.         }
  14.     }
  15. }
  16.  
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement