Advertisement
TeMePyT

Untitled

May 27th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _11.Convert_Speed_Units
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int distance = int.Parse(Console.ReadLine());
  14. int hours = int.Parse(Console.ReadLine());
  15. int minutes = int.Parse(Console.ReadLine());
  16. int seconds = int.Parse(Console.ReadLine());
  17.  
  18. double s = hours * 60 * 60 + minutes * 60 + seconds;
  19. double h = s / 60 / 60;
  20.  
  21. Console.WriteLine("{0:g7}", distance / s);
  22. Console.WriteLine("{0:g7}", (distance / h) / 1000);
  23. Console.WriteLine("{0:g7}", (distance / h) / 1609);
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement