Skip to content

Instantly share code, notes, and snippets.

@tsk-arh
Last active January 5, 2024 09:40
Show Gist options
  • Save tsk-arh/e98df07b70e9fdfe9bd8da78b7835091 to your computer and use it in GitHub Desktop.
Save tsk-arh/e98df07b70e9fdfe9bd8da78b7835091 to your computer and use it in GitHub Desktop.
ЗАДАНИЕ Поликлиника
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp4
{
internal class Program
{
static void Main(string[] args)
{
int peoplesQue;
int onesWorkTimeless;
int waitingTimeHours;
int waitingTimeMinutes;
int hourHaveMinuts = 60;
Console.WriteLine($"Сколько людей в очереди?");
peoplesQue = Convert.ToInt32(Console.ReadLine());
onesWorkTimeless = 10;
waitingTimeMinutes = peoplesQue * onesWorkTimeless;
waitingTimeHours = waitingTimeMinutes / hourHaveMinuts;
if ( waitingTimeHours != 0)
{
waitingTimeMinutes = waitingTimeMinutes % hourHaveMinuts;
}
Console.WriteLine($"Вы должны отстоять в очереди {waitingTimeHours} часов {waitingTimeMinutes} минут");
Console.ReadLine();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment