Advertisement
Gudini

Homework1_7

Sep 25th, 2023 (edited)
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.84 KB | Source Code | 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 Homework1_7
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int oldLadies;
  14.             int queueTime;
  15.             int receptionTime = 10;
  16.             int hourInMinutes = 60;
  17.             int hours;
  18.             int minutes;
  19.  
  20.             Console.Write("Введите количество старушек: ");
  21.             oldLadies = Convert.ToInt32(Console.ReadLine());
  22.  
  23.             queueTime = oldLadies * receptionTime;
  24.             hours = queueTime / hourInMinutes;
  25.             minutes = queueTime % hourInMinutes;
  26.  
  27.             Console.WriteLine($"Вы должны отстоять в очереди {hours} часа и {minutes} минут.");
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement