Last active
May 17, 2025 06:43
-
-
Save raingat/6fa2471b323d8c98975d52930b61dbd7 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; | |
namespace IUnior | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int fixedTimeReceptionInMinutes = 10; | |
int minutesInHour = 60; | |
int countPeople; | |
int waitingTimeInMinutes; | |
int waitingTimeInHours; | |
Console.Write("Введите количество людей в очереди: "); | |
countPeople = Convert.ToInt32(Console.ReadLine()); | |
waitingTimeInMinutes = (countPeople * fixedTimeReceptionInMinutes) % minutesInHour; | |
waitingTimeInHours = (countPeople * fixedTimeReceptionInMinutes) / minutesInHour; | |
Console.WriteLine($"Время ожидания час:минута -> {waitingTimeInHours}:{waitingTimeInMinutes}"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment