Advertisement
Guest User

Untitled

a guest
Oct 21st, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 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 _7_ma
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. var m = double.Parse(Console.ReadLine());
  15. var n = double.Parse(Console.ReadLine());
  16. var p = double.Parse(Console.ReadLine());
  17.  
  18.  
  19. var secs = m + n + p;
  20. var mins = 0;
  21.  
  22. if (secs >= 59)
  23. {
  24. if (secs >= 10)
  25. {
  26. Console.WriteLine($"0:{secs}");
  27. }
  28.  
  29. else {
  30. Console.WriteLine($"0:0{secs}");
  31.  
  32. }
  33.  
  34.  
  35. }
  36. else if (secs >= 60 && secs <= 119)
  37. {
  38. if (secs - 60 >= 10)
  39. {
  40. Console.WriteLine($"1:{secs - 60 }");
  41. }
  42.  
  43. else {
  44. Console.WriteLine($"1:0{secs - 60} ");
  45.  
  46.  
  47. }
  48.  
  49.  
  50.  
  51. }
  52.  
  53.  
  54. else if (secs >= 120 && secs <= 179)
  55. {
  56. if (secs - 120 >=10)
  57. {
  58. Console.WriteLine($"2:{secs -120}");
  59. }
  60.  
  61. else
  62. {
  63. Console.WriteLine($"2:0{secs - 120}");
  64. }
  65. }
  66.  
  67.  
  68.  
  69. }
  70. }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement