Advertisement
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 SumSeconds
- {
- class Program
- {
- static void Main(string[] args)
- {
- var time = int.Parse(Console.ReadLine());
- var time1 = int.Parse(Console.ReadLine());
- var time2 = int.Parse(Console.ReadLine());
- int result = time + time1 + time2;
- if (result < 60 && result > 10)
- {
- Console.WriteLine("0:" + result);
- }
- else if (result < 119 && result >= 60)
- {
- Console.WriteLine("1:" + (result - 60));
- }
- else if (result >= 120 && result < 179)
- {
- Console.WriteLine("2:" + (result - 120));
- }
- else if (result < 10)
- {
- Console.WriteLine("0:0" + result);
- }
- }
- } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement