Advertisement
Montagne94

7. Поликлиника

Jan 7th, 2025 (edited)
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | Source Code | 0 0
  1. using System;
  2.  
  3. namespace HomeWork
  4. {
  5.     public class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int minutesPerPatient = 10;
  10.             int minutesInHour = 60;
  11.  
  12.             Console.Write("Введите количество пациентов: ");
  13.             int patientCount = int.Parse(Console.ReadLine());
  14.  
  15.             int totalMinutes = patientCount * minutesPerPatient;
  16.  
  17.             int waitingHours = totalMinutes / minutesInHour;
  18.             int waitingMinutes = totalMinutes % minutesInHour;
  19.  
  20.             Console.WriteLine($"Вы должны отстоять в очереди {waitingHours} часов и {waitingMinutes} минут.");
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement