Advertisement
Rodunskiy

Untitled

Apr 15th, 2024
642
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1. int peopleInQueue;
  2. int fixedTimeOnePeople = 10;
  3. int timeInQueueHour;
  4. int timeInQueueMin;
  5. int hour = 60;
  6.  
  7. Console.WriteLine("Введите кол-во людей в очереди.");
  8. peopleInQueue = Convert.ToInt32(Console.ReadLine());
  9.  
  10. int totalTimeInQueue = fixedTimeOnePeople * peopleInQueue;
  11.  
  12. timeInQueueHour = totalTimeInQueue / hour;
  13. timeInQueueMin = totalTimeInQueue % hour;
  14.  
  15. Console.WriteLine($"Вы должны отстоять в очереди {timeInQueueHour} часа и {timeInQueueMin} минут.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement