Advertisement
TeT91

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

May 8th, 2024 (edited)
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.98 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace CSLight
  8. {
  9.     internal class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int minutesForMan = 10;
  14.             int minutesInHour = 60;
  15.  
  16.             Console.WriteLine("Сколько людей в очереди?");
  17.             int peopleInQueu = Convert.ToInt32(Console.ReadLine());
  18.             int minutesToWait = minutesForMan * peopleInQueu;
  19.             int hoursToWait = minutesToWait / minutesInHour;
  20.             int extraMinutes = minutesToWait % minutesInHour;
  21.  
  22.             Console.WriteLine($"Время приме одного человека составляет {minutesForMan} минут. В очереди {peopleInQueu} человек. Вам нужно подождать " +
  23.                 $"{(hoursToWait)} часов {extraMinutes} минут ");
  24.  
  25.             Console.ReadLine();
  26.         }
  27.     }
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement