Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace grandmothers
- {
- class Program
- {
- static void Main(string[] args)
- {
- int countGrandMothers;
- int timeWaitHours;
- int timeWaitMinutes;
- bool isQueue;
- Console.Write("Введите количество старушек в очереди: ");
- countGrandMothers = Convert.ToInt32(Console.ReadLine());
- isQueue = countGrandMothers >= 0;
- countGrandMothers *= Convert.ToInt32(isQueue);
- timeWaitHours = (10 * countGrandMothers) / 60;
- timeWaitMinutes = (10 * countGrandMothers) % 60;
- Console.WriteLine("Вы должны отстоять в очереди " + timeWaitHours + " часа и " + timeWaitMinutes + " минут.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement