Advertisement
PRO100LY4UK

1.9

Aug 15th, 2019
86
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.  
  3. namespace ConsoleApp5
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string numberOfPeopleInQueue;
  10.             int timeForOnePerson = 10;
  11.             string hello = "Введите число людей в очереди:";
  12.             int countOfPeople;
  13.             int time;
  14.             string end;
  15.             int hours;
  16.             int minutes;
  17.  
  18.             Console.Write(hello);
  19.             numberOfPeopleInQueue = Console.ReadLine();
  20.             countOfPeople = Convert.ToInt32(numberOfPeopleInQueue);
  21.             time = countOfPeople * timeForOnePerson;
  22.             hours = time / 60;
  23.             minutes = time % 60;
  24.            
  25.             end = "Вы должны отстоять в очереди: " + time + " минут или " + hours + " часов и " + minutes + " минут.";
  26.             Console.WriteLine(end);
  27.  
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement