Last active
May 16, 2023 15:46
-
-
Save Strelok78/74ecb15f30ca05ddaafd450dced323a5 to your computer and use it in GitHub Desktop.
Calculates time required to stay in a queue. The user enters the number of people in the queue. The fixed reception time of one person is always 10 minutes.
This file contains hidden or 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
namespace MyCode | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int amountOfVisitors; | |
int visitTime = 10; | |
int waitingTimeHours; | |
int waitingTimeMinutes; | |
int minutesInOneHour = 60; | |
Console.WriteLine("Введите кол-во старушек: "); | |
amountOfVisitors = int.Parse(Console.ReadLine()); | |
waitingTimeHours = amountOfVisitors * visitTime / minutesInOneHour; | |
waitingTimeMinutes = amountOfVisitors * visitTime % minutesInOneHour; | |
Console.WriteLine($"You must queue for {waitingTimeHours} hours and {waitingTimeMinutes} minutes."); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment