Skip to content

Instantly share code, notes, and snippets.

@Strelok78
Last active May 16, 2023 15:46
Show Gist options
  • Save Strelok78/74ecb15f30ca05ddaafd450dced323a5 to your computer and use it in GitHub Desktop.
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.
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