Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace SumSeconds
- {
- class Program
- {
- static void Main()
- {
- int firstTime = int.Parse(Console.ReadLine());
- int secondTime = int.Parse(Console.ReadLine());
- int thirdTime = int.Parse(Console.ReadLine());
- int total = firstTime + secondTime + thirdTime;
- int minutes = total / 60;
- int seconds = total % 60;
- if (seconds < 10)
- {
- Console.WriteLine($"{minutes}:0{seconds}");
- }
- else
- {
- Console.WriteLine($"{minutes}:{seconds}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement