Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp
- {
- class Program
- {
- static void Main(string[] args)
- {
- int timeForPatient = 10;
- int minutesInHour = 60;
- int numberPatients;
- int totalWaitingTime;
- int waitingTimeHours;
- int waitingTimeMinutes;
- Console.WriteLine("Сколько пациентов в очереди Вы видите: ");
- numberPatients = Convert.ToInt32(Console.ReadLine());
- totalWaitingTime = numberPatients * timeForPatient;
- waitingTimeHours = totalWaitingTime / minutesInHour;
- waitingTimeMinutes = totalWaitingTime % minutesInHour;
- Console.WriteLine($"На каждого пациента врач отводит {timeForPatient} минут. " +
- $"Вам придется подождать {waitingTimeHours} час(а) и {waitingTimeMinutes} минут. " +
- $"Спасибо за посещение нашей клиники.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement