Advertisement
Guest User

Untitled

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