Advertisement
AdemDev

Задание 7. Поликлиника

Aug 28th, 2023 (edited)
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp
  4. {
  5. internal class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int oneManTimeInMinutes = 10;
  10. int minutesPerHour = 60;
  11.  
  12. Console.Write("Сколько человек в очереди? ");
  13. int peopleCount = Convert.ToInt32(Console.ReadLine());
  14.  
  15. int totalTimeInMinutes = peopleCount * oneManTimeInMinutes;
  16.  
  17. int waitingHours = totalTimeInMinutes / minutesPerHour;
  18. int waitingMinutes = totalTimeInMinutes % minutesPerHour;
  19.  
  20. Console.WriteLine($"Вам осталось ждать {waitingHours} ч. {waitingMinutes} м.");
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement