Advertisement
simonradev

First

May 2nd, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Globalization;
  7.  
  8. namespace _1000DaysAfterBirth
  9. {
  10.     class Program
  11.     {
  12.         static void Main()
  13.         {
  14.             int firstSeconds = int.Parse(Console.ReadLine());
  15.             int secondSeconds = int.Parse(Console.ReadLine());
  16.             int thirdSeconds = int.Parse(Console.ReadLine());
  17.  
  18.             int totalSeconds = firstSeconds + secondSeconds + thirdSeconds;
  19.  
  20.             int minutes = totalSeconds / 60;
  21.             int seconds = totalSeconds % 60;
  22.  
  23.             Console.WriteLine($"{minutes}:{seconds:d2}");
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement