OldBeliver

Cycles_07

Mar 8th, 2021 (edited)
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.08 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 CSharpCycles07
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             // буквы на Парселтанге https://pm1.narvii.com/6966/8b1b1a44dad878c32161ed98b654d1d2fd850bf3r1-480-331v2_hq.jpg
  14.             string password = "сая-эф-хи-аш-сая-са-саш-шла";
  15.             string checkPassword;
  16.             int guess = 3;
  17.             Random rand = new Random();
  18.             int reaction;
  19.  
  20.             for (int i = 0; i < guess; i++)
  21.             {
  22.                 Console.Write("Чтобы попасть в тайную комнату напишите что-нибудь на Парселтанге: ");
  23.                 checkPassword = Console.ReadLine();
  24.                 if (password == checkPassword)
  25.                 {
  26.                     Console.WriteLine("В Ваших жилах течет кровь Салазара");
  27.                     break;
  28.                 }
  29.                 else
  30.                 {
  31.                     reaction = rand.Next(0, 5);
  32.                     switch (reaction)
  33.                     {
  34.                         case 0:
  35.                             Console.WriteLine("Мерлиновы штаны, как твой язык повернулся такое сказать");
  36.                             break;
  37.                         case 1:
  38.                             Console.WriteLine("эф-се-си-са-хе-хас");
  39.                             break;
  40.                         case 3:
  41.                             Console.WriteLine("странный акцент, Вы не из корнуэльских пикси будете?");
  42.                             break;
  43.                         case 4:
  44.                             Console.WriteLine("Бладжер тебя тресни");
  45.                             break;
  46.                     }                    
  47.                 }                
  48.             }
  49.             Console.ReadKey();
  50.         }
  51.     }
  52. }
  53.  
Add Comment
Please, Sign In to add comment