Advertisement
Fox_McCloud77

CSLight_HW_3

Feb 10th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.88 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace CSLight_HW_3
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.OutputEncoding = Encoding.UTF8;
  14.  
  15.             int lineLength;
  16.             int doctorTime = 10;
  17.             int waitingTimeHours;
  18.             int waitingTimeMinutes;
  19.  
  20.             Console.Write("Введите кол-во старушек: ");
  21.             lineLength = Convert.ToInt32(Console.ReadLine());
  22.  
  23.             waitingTimeHours = (lineLength * doctorTime) / 60;
  24.             waitingTimeMinutes = (lineLength * doctorTime) % 60;
  25.  
  26.             Console.WriteLine($"Вы должны отстоять в очереди {waitingTimeHours} час(а) {waitingTimeMinutes} минут.");
  27.             Console.ReadKey();
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement