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 lesson2
- {
- class Program
- {
- static void Main(string[] args)
- {
- bool isOpen = false;
- Console.Write("Введите ваш возраст: ");
- int age = Convert.ToInt32(Console.ReadLine());
- isOpen = age > 17;
- if (isOpen)
- Console.WriteLine("Добро пожаловать");
- else
- Console.WriteLine("Проход запрещен");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement