SHARE
TWEET

2.1

mon0l1t May 16th, 2019 (edited) 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace lesson2
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             bool isOpen = false;
  14.             Console.Write("Введите ваш возраст: ");
  15.             int age = Convert.ToInt32(Console.ReadLine());
  16.             isOpen = age > 17;
  17.             if (isOpen)
  18.                 Console.WriteLine("Добро пожаловать");
  19.             else
  20.                 Console.WriteLine("Проход запрещен");
  21.  
  22.  
  23.  
  24.         }
  25.     }
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top