alexey3017

1.6 - Магазин

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