Sininerebane

Untitled

Sep 10th, 2023
1,002
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 KB | Software | 0 0
  1. namespace SecretMessage
  2. {
  3.     internal class Program
  4.     {
  5.         static void Main(string[] args)
  6.         {
  7.             Console.OutputEncoding = Encoding.UTF8;
  8.  
  9.             string password;
  10.             string accessToMassage;
  11.  
  12.             accessToMassage = "123456789";
  13.  
  14.             for (int i=0; i < 3; i ++)
  15.             {
  16.                 Console.WriteLine("Введите свой пароль");
  17.                 password = Console.ReadLine();
  18.  
  19.                 if (password == accessToMassage)
  20.                 {
  21.                     Console.WriteLine("Вы читаете тайное сообщение");
  22.                 }
  23.                 else
  24.                 {
  25.                    Console.WriteLine ("Вам в тайном сообщение отказано");
  26.                 }
  27.             }
  28.  
  29.             Console.WriteLine("Приходите в следующий раз");
  30.             Console.ReadKey();
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment