Advertisement
growhack

Task with hospital

Mar 25th, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. using System;
  2.  
  3. namespace CSharpLight
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int peopleCount;
  10.             int timeOfReceipt = 10;
  11.             int waitingTime;
  12.             int waitingTimeInHours;
  13.             int waitingTimeInMinutes;
  14.             Console.Write("Введите количество старушек которых вы видите: ");
  15.             peopleCount = Convert.ToInt32(Console.ReadLine());
  16.             waitingTime = peopleCount * timeOfReceipt;
  17.             waitingTimeInHours = waitingTime / 60;
  18.             waitingTimeInMinutes = waitingTime % 60;
  19.             Console.WriteLine($"Вы должны отстоять в очереди {waitingTimeInHours} часа и {waitingTimeInMinutes} минут");
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement