Advertisement
Guest User

2.9

a guest
Aug 26th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.68 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _2._9
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.WriteLine("Привет, как тебя зовут?");
  14.             string userName = Console.ReadLine();
  15.  
  16.             Console.WriteLine("Привет {0}! Сколько тебе лет?",userName);
  17.             int userAge = Convert.ToInt32(Console.ReadLine());
  18.  
  19.             if (userAge<18)
  20.             {
  21.                 Console.WriteLine("Извини, но тебе закрыт доступ к программе!");
  22.             }
  23.             else
  24.             {
  25.                 Console.WriteLine("Замечательно! Ты ходишь в школу?");
  26.                 string school = Console.ReadLine();
  27.  
  28.                 if (school=="да"|| school == "Да")
  29.                 {
  30.                     Console.WriteLine("Обманщик, тебе нет 18!");
  31.                 }
  32.                 else
  33.                 {
  34.                     Console.WriteLine("Сентябрь горииит...\n1)Убийца плачет \n2)Птица париит \n3)Что это вообще такое?");
  35.                     string userInput = Console.ReadLine();
  36.  
  37.                     if (userInput=="2"|| userInput == "3")
  38.                     {
  39.                         Console.WriteLine("Обманщик!");
  40.                     }
  41.                     else
  42.                     {
  43.                         Console.WriteLine("Блеск! Ты прошел мой тест!");
  44.                     }
  45.                 }
  46.             }
  47.         }
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement