Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Ijunior
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- int totalPatients;
- int minutesForPatient = 10;
- int totalTimeWait;
- int hour = 60;
- int hourWait;
- int minuteWait;
- Console.Write("Сколько пациентов перед вами? ");
- totalPatients = Convert.ToInt32(Console.ReadLine());
- totalTimeWait = totalPatients * minutesForPatient;
- hourWait = totalTimeWait / hour;
- minuteWait = totalTimeWait % hour;
- Console.WriteLine($"Впереди вас очередь в {totalPatients} человек, время ожидания составит {hourWait} час и {minuteWait} минут");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment