RedFlys

Home Work 1.7 and 1.8

Oct 22nd, 2019
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.04 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 ConsoleApp1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int people;
  14.             int time_minutes;
  15.             int time_hour;
  16.             int time_minutes_without_hour;
  17.  
  18.             Console.WriteLine("Вы пришли в больницу. Время приёма одного человека 10 минут. Для расчёта времени ожидания введите кол-во человек в очереди:");
  19.             people = Convert.ToInt32(Console.ReadLine());
  20.  
  21.             time_minutes = people * 10;
  22.             time_hour = time_minutes / 60;
  23.             time_minutes_without_hour = time_minutes % 60;
  24.  
  25.             Console.WriteLine($"Время в ожидании своей очереди {time_minutes} минут или {time_hour} часов {time_minutes_without_hour} минут.");
  26.             Console.ReadKey();          
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment