Advertisement
Guest User

Untitled

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