Last active
May 11, 2024 21:32
-
-
Save MagSosiq/73d1df9b0d94ffbf1fa6a7a25fbec13f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace HW1 | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.InputEncoding = Encoding.Unicode; | |
Console.OutputEncoding = Encoding.Unicode; | |
Console.Write("Введите кол-во пациентов: "); | |
int numberOfPatients = Convert.ToInt32(Console.ReadLine()); | |
Console.Write("Введите время приёма 1 человека у врача: "); | |
int timeOfReceipt = Convert.ToInt32(Console.ReadLine()); | |
int minutesInHour = 60; | |
int waitingTimeInMinutes = numberOfPatients * timeOfReceipt; | |
int hoursInQueue = waitingTimeInMinutes / minutesInHour; | |
int minutesInQueue = waitingTimeInMinutes % minutesInHour; | |
Console.WriteLine($"Вы должны отстоять в очереди до приёма у врача {hoursInQueue} часа и {minutesInQueue} минут."); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment