Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int tryCount = 3;
- string userPassword = "12345";
- string userInput;
- for(int i = 0; i < tryCount; i++)
- {
- Console.WriteLine("Введите пароль: ");
- userInput = Console.ReadLine();
- if (userPassword == userInput)
- {
- Console.WriteLine("Секретная информация");
- break;
- }
- else
- {
- Console.WriteLine("Введите пароль еще раз: ");
- }
- }
- Console.ReadLine();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement