Advertisement
Legiomax

C#_1_lesson_clinic

Jan 3rd, 2024
678
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.00 KB | Software | 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 C_Ijun
  8. {
  9.     internal class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int countGrandMothers;
  14.             int timeWaitHours;
  15.             int timeWaitMinutes;
  16.             int timeHandlingOnePersonMinutes = 10;
  17.             int countMinutesInHour = 60;
  18.             Console.Write("Введите количество старушек в очереди: ");
  19.             countGrandMothers = Convert.ToInt32(Console.ReadLine());
  20.             timeWaitHours = (timeHandlingOnePersonMinutes * countGrandMothers) / countMinutesInHour;
  21.             timeWaitMinutes = (timeHandlingOnePersonMinutes * countGrandMothers) % countMinutesInHour;
  22.             Console.WriteLine("Вы должны отстоять в очереди " + timeWaitHours + " часа и " + timeWaitMinutes + " минут.");
  23.             Console.ReadLine();
  24.         }
  25.     }
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement