SaNik74

Hospital

Jan 21st, 2024
919
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. class Program
  2. {
  3.     static void Main(string[] args)
  4.     {
  5.         int onePersonInLineWaiting = 10;
  6.         int minutesInHour = 60;
  7.         int hoursInLine;
  8.         int minutesInLine;
  9.         int peoplesInLine;
  10.         int minutesRemaining;
  11.  
  12.         Console.WriteLine("Введите кол-во людей в очереди:");
  13.         peoplesInLine = Convert.ToInt32(Console.ReadLine());
  14.  
  15.         minutesInLine = peoplesInLine * onePersonInLineWaiting;
  16.         hoursInLine = minutesInLine / minutesInHour;
  17.         minutesRemaining = minutesInLine % minutesInHour;
  18.  
  19.         Console.WriteLine($"Время ожидания {hoursInLine} - часов, {minutesRemaining} - минут.");
  20.     }
  21. }
Advertisement
Comments
  • DarthDominic12
    2 years
    # text 0.02 KB | 0 0
    1. what does this do
    • SaNik74
      2 years
      # text 0.20 KB | 0 0
      1. This is an assignment from a programming course where I am currently studying.
      2.  
      3. The essence of the problem is to calculate the waiting time in the queue. the waiting time is fixed and equal to 10 minutes
Add Comment
Please, Sign In to add comment