alexey3017

1.8 - Поликлиника

Mar 19th, 2020
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.78 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. namespace Learn1
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             int timeOrReceipt = 10;
  13.             int people;
  14.             int totalTime;
  15.             int hour;
  16.             int min;
  17.            
  18.             Console.Write("Введите количество человек в очереди: ");
  19.             people = Convert.ToInt32(Console.ReadLine());
  20.  
  21.             totalTime = people * timeOrReceipt;
  22.             hour = totalTime / 60;
  23.             min = totalTime % 60;
  24.  
  25.             Console.WriteLine($"Вы должны отстоять в очереди {hour} часов {min} минут");
  26.         }
  27.     }
  28. }
Add Comment
Please, Sign In to add comment