Garloon

2.9

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