Advertisement
Rodunskiy

Untitled

Apr 15th, 2024
619
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 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. timeInQueueHour = (fixedTimeOnePeople * peopleInQueue) / hour;
  11. timeInQueueMin = (fixedTimeOnePeople * peopleInQueue) % hour;
  12.  
  13. Console.WriteLine($"Вы должны отстоять в очереди {timeInQueueHour} часа и {timeInQueueMin} минут.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement