Last active
May 24, 2026 17:16
-
-
Save smah-beep/d2b51798dca73720418ded2566f828a2 to your computer and use it in GitHub Desktop.
ДЗ: Поликлиника
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace _DZ_ | |
| { | |
| internal class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| int patient; | |
| int timeReception = 10; | |
| int minuteInHour = 60; | |
| Console.WriteLine("Вы пришли в больницу и видете очередь к вашему врачу"); | |
| Console.WriteLine("Вам стало интересно сколько придётся ждать, прежде чем наступит ваша очередь"); | |
| Console.Write($"Вы знаете, что время приёма у врача {timeReception} минут. Укажите сколько пациентов стоит перед вами: "); | |
| patient = Convert.ToInt32(Console.ReadLine()); | |
| int hourTimeWaiting = (timeReception * patient) / minuteInHour; | |
| int minuteTimeWaiting = (timeReception * patient) % minuteInHour; | |
| Console.WriteLine($"После некоторых подсчётов вы узнали, что вам осталось ждать такое количество часов: {hourTimeWaiting}, такое количество минут: {minuteTimeWaiting}"); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment