Pirnogion

IJCSHW7

Sep 22nd, 2025
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.86 KB | None | 0 0
  1. using System;
  2. using System.Text;
  3.  
  4. namespace CSLite1
  5. {
  6.     internal class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             Console.InputEncoding = Encoding.Unicode;
  11.             Console.OutputEncoding = Encoding.Unicode;
  12.  
  13.             int minutesPerHour = 60;
  14.             int appointmentDuration = 10;
  15.  
  16.             int patientsCount;
  17.  
  18.             Console.Write("Сколько людей в очереди: ");
  19.             patientsCount = Convert.ToInt32(Console.ReadLine());
  20.  
  21.             int waitingTime = patientsCount * appointmentDuration;
  22.  
  23.             int hours = waitingTime / minutesPerHour;
  24.             int minutes = waitingTime % minutesPerHour;
  25.  
  26.             Console.WriteLine($"Время ожидания в очереди {hours} часов {minutes} минут.");
  27.             Console.ReadKey();
  28.         }
  29.     }
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment