From c06278eb117f48312b29bd39b050ebf4c9637fbf Mon Sep 17 00:00:00 2001 From: teolord <74703619+teolord@users.noreply.github.com> Date: Sun, 31 Oct 2021 16:48:17 +0100 Subject: [PATCH] Update SO.1 {TEOLORD} --- 1.B/HM.1 VYPOČTENÍ ČASU/SO.1 {TEOLORD} | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/1.B/HM.1 VYPOČTENÍ ČASU/SO.1 {TEOLORD} b/1.B/HM.1 VYPOČTENÍ ČASU/SO.1 {TEOLORD} index 8b13789..74ac9a0 100644 --- a/1.B/HM.1 VYPOČTENÍ ČASU/SO.1 {TEOLORD} +++ b/1.B/HM.1 VYPOČTENÍ ČASU/SO.1 {TEOLORD} @@ -1 +1,23 @@ +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}"); + + + } + } +}