Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. using System;
  2.  
  3. namespace if_else_exercise
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int time1 = int.Parse(Console.ReadLine());
  10. int time2 = int.Parse(Console.ReadLine());
  11. int time3 = int.Parse(Console.ReadLine());
  12.  
  13. int allTime = time1 + time2 + time3;
  14. int allTimeInMinutes = allTime / 60;
  15. int seconds= allTime % 60;
  16.  
  17. Console.WriteLine($"{allTimeInMinutes}:{seconds:D2}");
  18.  
  19.  
  20.  
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement