From fbff118f5470f528af5b4832425de6e5b6144710 Mon Sep 17 00:00:00 2001 From: teolord <74703619+teolord@users.noreply.github.com> Date: Sun, 31 Oct 2021 15:36:35 +0100 Subject: [PATCH] Add files via upload --- VYPOČTENÍ ČASU.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 VYPOČTENÍ ČASU.cs diff --git a/VYPOČTENÍ ČASU.cs b/VYPOČTENÍ ČASU.cs new file mode 100644 index 0000000..88cea6c --- /dev/null +++ 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