Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace PeopleInQueue
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- {
- Console.OutputEncoding = Encoding.UTF8;
- int peopleInQueue;
- int appointmentLength = 10;
- int waitingHours;
- int minutesPerHour = 60;
- int waitingMinutes;
- int temp;
- Console.Write("Введите количество людей в очереди: ");
- peopleInQueue = Convert.ToInt32(Console.ReadLine());
- Console.Write(" Учитывайте, что фиксированное время приема одного человека всегда равно 10 минут. ");
- temp = peopleInQueue * appointmentLength;
- waitingHours = temp / minutesPerHour;
- waitingMinutes = temp % minutesPerHour;
- Console.WriteLine("Вам ждать своей очереди {0} часов, и {1} минут.", waitingHours, waitingMinutes);
- Console.ReadKey();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment