Advertisement
PavelSlavov

Untitled

Jan 23rd, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 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 SumSeconds
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var time = int.Parse(Console.ReadLine());
  14. var time1 = int.Parse(Console.ReadLine());
  15. var time2 = int.Parse(Console.ReadLine());
  16.  
  17. int result = time + time1 + time2;
  18.  
  19. if (result < 59 && result > 10)
  20. {
  21. Console.WriteLine("0:" + result);
  22. }
  23. else if (result < 119 && result >= 60)
  24. {
  25. Console.WriteLine("1:" + (result - 60));
  26. }
  27. else if (result >= 120 && result < 179)
  28. {
  29. Console.WriteLine("2:" + (result - 120));
  30. }
  31. else if (result < 10)
  32. {
  33. Console.WriteLine("0:0" + result);
  34. }
  35.  
  36.  
  37. }
  38. } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement