Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string password = "123";
- int count = 3;
- for (int i = 0; i <= count; i++)
- {
- Console.WriteLine("Программа под паролем.Введите пароль: ");
- string input = Console.ReadLine();
- if (password == input)
- {
- Console.WriteLine("Cекретное сообщение");
- break;
- }
- else
- {
- Console.WriteLine("Неверный пароль.Количество попыток: " + (count-i));
- }
- }
- Console.WriteLine();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement