Advertisement
bonumopus

Untitled

Apr 8th, 2020
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.92 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 queue
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int oldLadies;
  14.             int waitTime;
  15.             int hours;
  16.             int minutes;
  17.  
  18.             Console.WriteLine("Вы зашли в поликлинику и видите огромную очередь из старушек.");
  19.             Console.WriteLine("Введите количество старушек в очереди:");
  20.             oldLadies = Convert.ToInt32(Console.ReadLine());
  21.  
  22.             waitTime = oldLadies * 10;
  23.             hours = waitTime / 60;
  24.             minutes = waitTime % 60;
  25.  
  26.             Console.WriteLine($"Вы должны отстоять в очереди {hours} часов {minutes} минут.");
  27.             Console.ReadLine();
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement