VIzlo

Task 7

Aug 23rd, 2022 (edited)
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.62 KB | Gaming | 0 0
  1.             Random random = new Random();
  2.             int minQuantityOldPeaple = 3;
  3.             int maxQuantityOldPeaple = 20;
  4.             int timeInQueue = 10;
  5.             int minutsInHours = 60;
  6.  
  7.             int oldPeaple = random.Next(minQuantityOldPeaple, maxQuantityOldPeaple);
  8.             int queueTime = timeInQueue * oldPeaple;
  9.             int timeСalculationInHours = queueTime / minutsInHours;
  10.             int timeСalculationInMinuts = queueTime % minutsInHours;
  11.  
  12.             Console.WriteLine($"Вы простоите в очереди {timeСalculationInHours} часов, {timeСalculationInMinuts} минут");
Advertisement
Add Comment
Please, Sign In to add comment