Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Task 007, Chapter 3.0
- using System;
- public class SumSeconds
- {
- static void Main()
- {
- int firstCompetitor = int.Parse(Console.ReadLine());
- int secondCompetitor = int.Parse(Console.ReadLine());
- int thirdCompetitor = int.Parse(Console.ReadLine());
- int seconds = firstCompetitor + secondCompetitor + thirdCompetitor;
- int minutes = 0;
- if(seconds > 59)
- {
- minutes++;
- seconds -= 60;
- }
- if (seconds > 59)
- {
- minutes++;
- seconds -= 60;
- }
- if(seconds < 10)
- {
- Console.WriteLine(minutes + ":" + "0" + seconds);
- }
- else
- {
- Console.WriteLine(minutes + ":" + seconds);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment