Sininerebane

Untitled

May 19th, 2023
998
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 waitingHours;
  12.                 int minutesPerHour = 60;
  13.                 int waitingMinutes;
  14.                 int temp;
  15.  
  16.                 Console.Write("Введите количество людей в очереди: ");
  17.                 peopleInQueue = Convert.ToInt32(Console.ReadLine());
  18.                 Console.Write(" Учитывайте, что фиксированное время приема одного человека всегда равно 10 минут. ");
  19.  
  20.                 temp = peopleInQueue * appointmentLength;
  21.                 waitingHours = temp / minutesPerHour;
  22.                 waitingMinutes = temp % minutesPerHour;
  23.  
  24.                 Console.WriteLine("Вам ждать своей очереди {0} часов,  и {1} минут.", waitingHours, waitingMinutes);
  25.  
  26.                 Console.ReadKey();
  27.             }
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment