Last active
January 5, 2024 09:40
-
-
Save tsk-arh/e98df07b70e9fdfe9bd8da78b7835091 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.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