Dr_Max_Experience

Task 5

Aug 11th, 2021 (edited)
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 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 Homework_1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int waitingTimeInMinutes = 10, minutesInHour = 60;
  14.             Console.Write("Количество человек в очереди: ");
  15.             int people = Convert.ToUInt16(Console.ReadLine());
  16.  
  17.             int hourWaiting = people * waitingTimeInMinutes / minutesInHour;
  18.             int minutesWaiting = people * waitingTimeInMinutes % minutesInHour;
  19.             Console.WriteLine($"Время ожидания\nЧасов: {hourWaiting}\nМинут: {minutesWaiting}");
  20.             Console.ReadKey();
  21.  
  22.         }
  23.     }
  24. }
  25.  
Add Comment
Please, Sign In to add comment