Last active
February 8, 2025 13:41
-
-
Save UglyOk/f1ece5b8137f9f53cdd6eee51f6f79d1 to your computer and use it in GitHub Desktop.
This file contains 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 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