NikaBang

ДЗ: Поликлиника

Oct 5th, 2025
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | Gaming | 0 0
  1. internal class Program
  2. {
  3.     static void Main(string[] args)
  4.     {
  5.         int peopleInLine;
  6.         int hours;
  7.         int minutes;
  8.         int minutesInHour = 60;
  9.         int meetingDurationInMinutes = 10;
  10.         int waitingTimeInMinutes;
  11.  
  12.         Console.Write("Сколько человек в очереди: ");
  13.         peopleInLine = Convert.ToInt32(Console.ReadLine());
  14.  
  15.         waitingTimeInMinutes = peopleInLine * meetingDurationInMinutes;
  16.         hours = waitingTimeInMinutes / minutesInHour;
  17.         minutes = waitingTimeInMinutes % minutesInHour;
  18.  
  19.         Console.Write($"Время ожидания: {hours} часов {minutes} минут.");
  20.         Console.ReadKey();
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment