Advertisement
IGRODELOFF

Task5

Mar 1st, 2022
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 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 Task5
  8. {
  9. internal class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int timeReceipt = 10;
  14. int minuteInHours = 60;
  15. int peopleCount;
  16. int totalTimeMinutes;
  17. int hoursReceipt;
  18.  
  19. Console.WriteLine("Сколько старушек в очереди на приём вы видите?: ");
  20. peopleCount = Convert.ToInt32(Console.ReadLine());
  21.  
  22. totalTimeMinutes = timeReceipt * peopleCount;
  23. hoursReceipt = totalTimeMinutes / minuteInHours;
  24. timeReceipt = totalTimeMinutes % minuteInHours;
  25.  
  26. Console.WriteLine("Вы должны отстоять в очереди " + hoursReceipt + " часа и " + timeReceipt + " минут.");
  27.  
  28. }
  29. }
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement