Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Console_AppTry
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- int peopleInQueue;
- int appointmentLength = 10;
- int hour;
- int minutes;
- Console.WriteLine("Введите количество людей в очереди");
- peopleInQueue = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine(" Учитывайте, что фиксированное время приема одного человека всегда равно 10 минутам");
- hour = peopleInQueue * appointmentLength / 60;
- minutes = peopleInQueue * appointmentLength % 60;
- if (hour == 0)
- {
- Console.WriteLine("Вам ждать своей очереди {0} минут.", minutes);
- }
- else
- {
- Console.WriteLine("Вам ждать своей очереди {0} часов, и {1} минут.", hour, minutes);
- }
- Console.ReadKey(); //Ожидается нажание какой либо клавиши
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment