Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace seconds_calc
- {
- class Program
- {
- static void Main(string[] args)
- {
- int time1 = int.Parse(Console.ReadLine());
- int time2 = int.Parse(Console.ReadLine());
- int time3 = int.Parse(Console.ReadLine());
- int totaltime = time1 + time2 + time3;
- int minutes = totaltime / 60;
- int seconds = totaltime % 60;
- if (seconds < 10)
- {
- Console.WriteLine("{0}:0{1}", minutes, seconds);
- }
- else
- {
- Console.WriteLine("{0}:{1}", minutes, seconds);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement