W1thr

Домашка №5

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