Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int loginAttempts = 3;
- string userPassword = "1234";
- string passwordInput;
- Console.WriteLine("Добро пожаловать в систему!");
- for (int i = 0; i < loginAttempts; i++)
- {
- Console.Write("Введите ваш пароль: ");
- passwordInput = Console.ReadLine();
- if(passwordInput == userPassword)
- {
- Console.WriteLine("Пароль верен!");
- Console.WriteLine("Секретное сообщение: Путин - царь всея руси");
- }
- else
- {
- Console.WriteLine("Пароль не правильный, попробуйте еще раз!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment