bacco

Сумиране на секунди"2"

Jan 22nd, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1. using System;
  2.  
  3. namespace tESt
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             var firstSec = int.Parse(Console.ReadLine());
  11.             var secondSec = int.Parse(Console.ReadLine());
  12.             var thirthSec = int.Parse(Console.ReadLine());
  13.  
  14.             var totalSec = firstSec + secondSec + thirthSec;
  15.  
  16.             var min = totalSec / 60;
  17.             var sec = totalSec % 60;
  18.  
  19.             Console.WriteLine($"{min}:{sec:d2}");
  20.  
  21.  
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment