Advertisement
NikaBang

Поликлиника

May 12th, 2024 (edited)
576
0
19 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using System;
  2. using System.Runtime.ConstrainedExecution;
  3.  
  4. internal class Program
  5. {
  6.     static void Main(string[] args)
  7.     {
  8.         int receptionMinutes = 10;
  9.         int minPerHour = 60;
  10.         int queue;
  11.         int waitTime;
  12.         int hours;
  13.         int minutes;
  14.  
  15.         Console.Write("Сколько человек в очереди: ");
  16.         queue = Convert.ToInt32(Console.ReadLine());
  17.  
  18.         waitTime = receptionMinutes * queue;
  19.         hours = waitTime / minPerHour;
  20.         minutes = waitTime % minPerHour;
  21.  
  22.         Console.WriteLine($"Время ожидания: {hours} часов {minutes} минут.");
  23.         Console.ReadKey();
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement