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 _7_ma
- {
- class Program
- {
- static void Main(string[] args)
- {
- var m = double.Parse(Console.ReadLine());
- var n = double.Parse(Console.ReadLine());
- var p = double.Parse(Console.ReadLine());
- var secs = m + n + p;
- var mins = 0;
- if (secs >= 59)
- {
- if (secs >= 10)
- {
- Console.WriteLine($"0:{secs}");
- }
- else {
- Console.WriteLine($"0:0{secs}");
- }
- }
- else if (secs >= 60 && secs <= 119)
- {
- if (secs - 60 >= 10)
- {
- Console.WriteLine($"1:{secs - 60 }");
- }
- else {
- Console.WriteLine($"1:0{secs - 60} ");
- }
- }
- else if (secs >= 120 && secs <= 179)
- {
- if (secs - 120 >=10)
- {
- Console.WriteLine($"2:{secs -120}");
- }
- else
- {
- Console.WriteLine($"2:0{secs - 120}");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement