Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Sum_Seconds
- {
- class Program
- {
- static void Main(string[] args)
- {
- int time1 = int.Parse(Console.ReadLine());
- int time2 = int.Parse(Console.ReadLine());
- int time3 = int.Parse(Console.ReadLine());
- int time = time1 + time2 + time3;
- if (time >= 0 && time <= 59)
- {
- Console.WriteLine("0:0" + time);
- }
- else if (time >= 60 && time <= 119)
- {
- Console.WriteLine("1:0" + (time - 60));
- }
- else if (time >= 120 && time <= 179)
- {
- Console.WriteLine("2:0" + (time - 120));
- }
- else if (time < 10)
- {
- Console.WriteLine("0:0"+time);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment