From 011e6ca6f04d77f058a904ba20b0a489d0500465 Mon Sep 17 00:00:00 2001 From: teolord <74703619+teolord@users.noreply.github.com> Date: Sun, 31 Oct 2021 16:13:05 +0100 Subject: [PATCH] Add files via upload --- 1.B/VYPOČTENÍ ČASU.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 1.B/VYPOČTENÍ ČASU.cs diff --git a/1.B/VYPOČTENÍ ČASU.cs b/1.B/VYPOČTENÍ ČASU.cs new file mode 100644 index 0000000..88cea6c --- /dev/null +++ b/1.B/VYPOČTENÍ ČASU.cs @@ -0,0 +1,22 @@ +//by TeolorD +using System; + +namespace ConsoleApp +{ + class Program + { + static void Main(string[] args) + { + Console.Write("Zadej minuty: "); + + int time = Int32.Parse(Console.ReadLine()); + + int leftminutes = time % 60; + + int hours = (time - leftminutes) / 60; + + Console.WriteLine($"Počet hodin: {hours}"); + Console.WriteLine($"Počet minut: {leftminutes}"); + } + } +} \ No newline at end of file