Advertisement
Rodunskiy

Untitled

Mar 31st, 2023
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. int grannysCount;
  2. int timeReception = 10;
  3. int timeQueue;
  4. int minutes;
  5. int hour;
  6.  
  7. Console.Write("Сколько бабушек в очереди?");
  8. grannysCount = Convert.ToInt32(Console.ReadLine());
  9.  
  10. timeQueue = timeReception * grannysCount;
  11. minutes = timeQueue % 60;
  12. hour = timeQueue / 60;
  13.  
  14. Console.WriteLine($"Вы должны отстоять в очереди {hour} часа и {minutes} минут.");
  15.  
  16.  
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement