Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConditionalStatementsAndL
- {
- class Program
- {
- static void Main(string[] args)
- {
- var hours = int.Parse(Console.ReadLine());
- var minutes = int.Parse(Console.ReadLine()) + 30;
- if (minutes > 59)
- {
- hours++;
- minutes -= 60;
- }
- if (hours > 23)
- {
- hours = 0;
- }
- Console.WriteLine($"{hours}:{minutes:d2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement