Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace C_sharp_Light
- {
- class Program
- {
- static void Main(string[] args)
- {
- string password = "qwerty";
- int countOfTry = 3;
- while(countOfTry > 0)
- {
- Console.Clear();
- Console.Write("Пароль: ");
- if (password == Console.ReadLine())
- {
- Console.WriteLine("Пароль правильный");
- Console.WriteLine("Секретное сообщение - Белочка производит туалетную бумагу");
- Console.ReadKey();
- break;
- }
- else
- {
- Console.WriteLine("Пароль неправильный. Попробуйте ещё раз!");
- countOfTry--;
- Console.ReadKey();
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement