Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace C_sharp_Light
- {
- class Program
- {
- static void Main(string[] args)
- {
- uint peopleInQueue;
- uint TimeReceptionPerson = 10;
- start:
- Console.WriteLine("Программа для расчета времени ожидания в очереди.\n");
- Console.Write("Сколько людей вы видите? Людей - ");
- if(!uint.TryParse(Console.ReadLine(), out peopleInQueue))
- {
- ErrorInvalidInput("Ошибка. Попробуйте ещё раз ввести количество людей.");
- goto start;
- }
- Console.WriteLine($"\nВ очереди {peopleInQueue} людей.\n" +
- $"Вы будете ждать своей очереди {peopleInQueue * TimeReceptionPerson/60} часа и {peopleInQueue * TimeReceptionPerson % 60} минут") ;
- Console.ReadKey();
- }
- static private void ErrorInvalidInput(string textError)
- {
- Console.WriteLine(textError);
- Console.ReadKey();
- Console.Clear();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement