Last active
April 2, 2025 12:30
-
-
Save Strelok78/8c788dc096a633f98ee80f9c3c54bbc1 to your computer and use it in GitHub Desktop.
Расчет времени ожидания в очереди поликлиники (10 мин - 1 человек)
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
| namespace iJuniorPractice; | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| int patientCountInQueue; | |
| int minPerPatient = 10; | |
| int waitingTimeTotal; | |
| int minutesInHour = 60; | |
| int waitingMinutes; | |
| int waitingHours; | |
| Console.Write("Введите количество пациентов: "); | |
| patientCountInQueue = int.Parse(Console.ReadLine()); | |
| waitingTimeTotal = patientCountInQueue * minPerPatient; | |
| waitingHours = waitingTimeTotal / minutesInHour; | |
| waitingMinutes = waitingTimeTotal % minutesInHour; | |
| Console.WriteLine($"Время ожидание {waitingHours} часа {waitingMinutes} минут"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment