Skip to content

Instantly share code, notes, and snippets.

@smah-beep
Last active May 24, 2026 17:16
Show Gist options
  • Select an option

  • Save smah-beep/d2b51798dca73720418ded2566f828a2 to your computer and use it in GitHub Desktop.

Select an option

Save smah-beep/d2b51798dca73720418ded2566f828a2 to your computer and use it in GitHub Desktop.
ДЗ: Поликлиника
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