Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _11.Convert_Speed_Units
- {
- class Program
- {
- static void Main(string[] args)
- {
- int distance = int.Parse(Console.ReadLine());
- int hours = int.Parse(Console.ReadLine());
- int minutes = int.Parse(Console.ReadLine());
- int seconds = int.Parse(Console.ReadLine());
- double s = hours * 60 * 60 + minutes * 60 + seconds;
- double h = s / 60 / 60;
- Console.WriteLine("{0:g7}", distance / s);
- Console.WriteLine("{0:g7}", (distance / h) / 1000);
- Console.WriteLine("{0:g7}", (distance / h) / 1609);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement