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