voldmaks

Поликлиника

Feb 19th, 2020
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.88 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 Задание_3
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int timeForOnePerson = 10;
  14.             int numberOfPeople;
  15.             int totalWaitingTime;
  16.            
  17.             Console.WriteLine("Введите количество людей, ожидающих приёма");
  18.             numberOfPeople = Convert.ToInt32(Console.ReadLine());
  19.             totalWaitingTime = numberOfPeople * timeForOnePerson;
  20.  
  21.             int queueWaitingHours = totalWaitingTime / 60;
  22.             int queueWaitingMinute = totalWaitingTime % 60;
  23.  
  24.             Console.WriteLine($"Вы должны отстоять в очереди {queueWaitingHours} часов {queueWaitingMinute} минут");
  25.         }
  26.     }
  27. }
Add Comment
Please, Sign In to add comment