-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLesson05.cs
More file actions
25 lines (21 loc) · 980 Bytes
/
Lesson05.cs
File metadata and controls
25 lines (21 loc) · 980 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
namespace Tired
{
class Program
{
static void Main(string[] args)
{
const int MinutesPerPerson = 10;
const int MinutesInHour = 60;
int oldersCountInQueue = 0;
int commonTimeToWait = 0;
Console.Write("Введите количество старушек, которые будут в очереди:");
oldersCountInQueue = Convert.ToInt32(Console.ReadLine());
commonTimeToWait = (minutesPerPerson * oldersCountInQueue);
int timeToWaitInMinutes = commonTimeToWait % MinutesInHour;
int timeToWaitInHours = commonTimeToWait / MinutesInHour;
Console.WriteLine("Общее время ожидание составляет " + TimeToWaitInHours+" час(-а/-ов) и "+ TimeToWaitInMinutes+" минут(-ы)!");
Console.ReadLine();
}
}
}