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 CSLight
- {
- class Program
- {
- static void Main(string[] args)
- {
- int age;
- bool IsDoorOpen;
- Console.WriteLine("Привет!");
- Console.WriteLine("Сколько тебе лет?");
- age = Convert.ToInt32(Console.ReadLine());
- if(age >= 18)
- {
- IsDoorOpen = true;
- }
- else
- {
- IsDoorOpen = false;
- }
- if (IsDoorOpen)
- {
- Console.WriteLine("Заходи братишка!");
- }
- else
- {
- Console.WriteLine("Иди учи уроки!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment