Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication9
- {
- class Program
- {
- static int Main(string[] args)
- {
- string vstup;
- Console.WriteLine("zadejte sekundy");
- vstup = Console.ReadLine();
- int sekundy;
- if (int.TryParse(vstup, out sekundy) != true)
- {
- return 1;
- }
- int hodiny, minuty;
- minuty = sekundy / 60;
- hodiny = minuty / 60;
- sekundy = sekundy - (minuty * 60);
- minuty = minuty - (hodiny * 60);
- Console.WriteLine("{0}h : {1}m : {2}s", hodiny, minuty, sekundy);
- Console.ReadLine();
- return 0;
- }
- }
- }
Add Comment
Please, Sign In to add comment