Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace homeWorkPoleclinic
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- int countPatients;
- int receptionTimeInSecond = 600;
- int calculationTimeSeconds;
- int calculationTimeMinutes;
- int calculationTimeHours;
- float remainingSeconds;
- float remainingMinutes;
- int convertTime = 60;
- Console.Write("Введиие количество пациентов в очереди: ");
- countPatients = Convert.ToInt32(Console.ReadLine());
- calculationTimeSeconds = countPatients * receptionTimeInSecond;
- calculationTimeMinutes = calculationTimeSeconds / convertTime;
- remainingSeconds = calculationTimeSeconds % convertTime;
- calculationTimeHours = calculationTimeMinutes / convertTime;
- remainingMinutes = calculationTimeMinutes % convertTime;
- Console.WriteLine($"Вы должны отстоять в очередь {calculationTimeHours} час-а, {remainingMinutes} минут-ы и {remainingSeconds} секунд-ы.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement