Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- bool sDoorOpen=false;
- while (sDoorOpen==false)
- {
- Console.WriteLine("Здравствуйте, введите свой возраст:\n");
- int age = Convert.ToInt32(Console.ReadLine());
- if (age>= 18)
- {
- sDoorOpen = true;
- Console.WriteLine("Дверь открыта");
- }
- else
- {
- Console.WriteLine("Подростете, потом приходите");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment