Advertisement
simonradev

Second

May 2nd, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 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.             TimeSpan timeSpanFromSeconds = TimeSpan.FromSeconds(firstSeconds + secondSeconds + thirdSeconds);
  19.            
  20.             Console.WriteLine($"{timeSpanFromSeconds.Minutes}:{timeSpanFromSeconds.Seconds:d2}");
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement