Skip to content

Instantly share code, notes, and snippets.

@Strelok78
Last active April 2, 2025 12:30
Show Gist options
  • Select an option

  • Save Strelok78/8c788dc096a633f98ee80f9c3c54bbc1 to your computer and use it in GitHub Desktop.

Select an option

Save Strelok78/8c788dc096a633f98ee80f9c3c54bbc1 to your computer and use it in GitHub Desktop.
Расчет времени ожидания в очереди поликлиники (10 мин - 1 человек)
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