Skip to content

Instantly share code, notes, and snippets.

@UglyOk
Last active February 8, 2025 13:41
Show Gist options
  • Save UglyOk/f1ece5b8137f9f53cdd6eee51f6f79d1 to your computer and use it in GitHub Desktop.
Save UglyOk/f1ece5b8137f9f53cdd6eee51f6f79d1 to your computer and use it in GitHub Desktop.
using System;
namespace DZZ
{
internal class Program
{
static void Main(string[] args)
{
int people;
int peopleTimeMinute = 10;
int minuteInLine;
int hoursInLine;
int minuteInHour = 60;
Console.WriteLine("Вы в больнице, стоите в очереди.");
Console.WriteLine($"Каждый человек проходит в кабинет за {peopleTimeMinute} минут");
Console.Write("Введите количество людей в очереди: ");
people = Convert.ToInt32(Console.ReadLine());
int allTimeInMinute = (people * peopleTimeMinute);
minuteInLine = allTimeInMinute % minuteInHour;
hoursInLine = allTimeInMinute / minuteInHour;
Console.WriteLine($"Вам придётся ждать своей очереди {hoursInLine} чаc и {minuteInLine} минут");
Console.ReadLine();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment