Advertisement
SPavelA

Untitled

Jul 28th, 2023
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1.             int minutesInHour = 60;
  2.             int durationOfReceptionInMinutes = 10;
  3.             Console.Write("Сколько старушек в очереди? ");
  4.             int numberOfGrannys = Convert.ToInt32(Console.ReadLine());
  5.             int queueLengthInMinutes = numberOfGrannys * durationOfReceptionInMinutes;
  6.             int hoursInQueue = queueLengthInMinutes / minutesInHour;
  7.             int minutesInQueue = queueLengthInMinutes % minutesInHour;
  8.             Console.WriteLine($"Вам придется отстоять в очереди {hoursInQueue} часов {minutesInQueue} минут.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement