Advertisement
Guest User

Untitled

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