Skip to content

Instantly share code, notes, and snippets.

@raingat
Last active May 17, 2025 06:43
Show Gist options
  • Save raingat/6fa2471b323d8c98975d52930b61dbd7 to your computer and use it in GitHub Desktop.
Save raingat/6fa2471b323d8c98975d52930b61dbd7 to your computer and use it in GitHub Desktop.
Поликлиника
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