Sininerebane

Untitled

May 17th, 2023
676
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.14 KB | Software | 0 0
  1. namespace PeopleInQueue
  2. {
  3.     internal class Program
  4.     {
  5.         static void Main(string[] args)
  6.         {
  7.             {
  8.                 Console.OutputEncoding = Encoding.UTF8;
  9.                 int peopleInQueue;
  10.                 int appointmentLength = 10;
  11.                 int hourWait;
  12.                 int minutes = 60;
  13.                 int minutesWait;
  14.  
  15.                 Console.Write("Введите количество людей в очереди: ");
  16.                 peopleInQueue = Convert.ToInt32(Console.ReadLine());
  17.                 Console.WriteLine(" Учитывайте, что фиксированное время приема одного человека всегда равно 10 минутам");
  18.  
  19.                 hourWait = peopleInQueue * appointmentLength / minutes;
  20.                 minutesWait = peopleInQueue * appointmentLength % minutes;
  21.  
  22.                 Console.WriteLine("Вам ждать своей очереди {0} часов,  и {1} минут.", hourWait, minutesWait);
  23.                 Console.ReadKey(); //Ожидается нажание какой либо клавиши
  24.             }
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment