Advertisement
Guest User

Untitled

a guest
May 31st, 2016
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. using System.Text;
  2. using System.Threading.Tasks;
  3.  
  4. namespace _13Times_15Minutes
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. int hour = int.Parse(Console.ReadLine());
  11. int minute = int.Parse(Console.ReadLine());
  12. minute = minute + 15;
  13. if (minute > 59)
  14. {
  15. hour++;
  16. minute -= 60;
  17. }
  18. if (hour > 23)
  19. {
  20. hour = 0;
  21. }
  22. if (minute < 10)
  23. {
  24. Console.WriteLine("{0}:0{1}", hour, minute);
  25.  
  26. }
  27. else
  28. {
  29. Console.WriteLine("{0}:{1}", hour, minute);
  30. }
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement