Advertisement
Guest User

Untitled

a guest
Sep 12th, 2016
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 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 Time_15Minutes
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int h = int.Parse(Console.ReadLine());
  14. int m = int.Parse(Console.ReadLine());
  15. m = m + 15;
  16.  
  17. if (m < 10)
  18. {
  19. Console.WriteLine(h + ":0" + m);
  20. }
  21. else if (m >= 60)
  22. {
  23. h = h + 1;
  24. m = m - 60;
  25. Console.WriteLine(h + ":0" + m);
  26.  
  27. }
  28. else if (h > 23)
  29. {
  30. h = h % 24;
  31. Console.WriteLine("{0}:{01:00}",h,m);
  32. }
  33. else
  34. {
  35. Console.WriteLine( "{0}:{1}",h,m);
  36. }
  37.  
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement