Advertisement
TwinFrame

Clight_07_Poliklinika

Mar 10th, 2023 (edited)
510
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Clight_07
  4. {
  5.     class Program
  6.     {
  7.         static void Main()
  8.         {
  9.             int numberPeople;
  10.             int totalTime;
  11.             int totalHours;
  12.             int totalMinutes;
  13.             int timeAppointment = 10;
  14.  
  15.             int oneHourInMinutes = 60;
  16.  
  17.             Console.Write("Введите количество старушек: ");
  18.             numberPeople = Convert.ToInt32(Console.ReadLine());
  19.  
  20.             totalTime = numberPeople * timeAppointment;
  21.  
  22.             totalHours = totalTime / oneHourInMinutes;
  23.             totalMinutes = totalTime % oneHourInMinutes;
  24.             Console.WriteLine($"Вы должны отстоять в очереди {totalHours} часа и {totalMinutes} минут");
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement