SHOW:
|
|
- or go back to the newest paste.
| 1 | using System; | |
| 2 | ||
| 3 | namespace C_sharp_Light | |
| 4 | {
| |
| 5 | class Program | |
| 6 | {
| |
| 7 | static void Main(string[] args) | |
| 8 | {
| |
| 9 | - | |
| 9 | + | string password = "qwerty"; |
| 10 | int countOfTry = 3; | |
| 11 | while(countOfTry > 0) | |
| 12 | {
| |
| 13 | Console.Clear(); | |
| 14 | Console.Write("Пароль: ");
| |
| 15 | if (password == Console.ReadLine()) | |
| 16 | {
| |
| 17 | Console.WriteLine("Пароль правильный");
| |
| 18 | Console.WriteLine("Секретное сообщение - Белочка производит туалетную бумагу");
| |
| 19 | Console.ReadKey(); | |
| 20 | break; | |
| 21 | } | |
| 22 | else | |
| 23 | {
| |
| 24 | Console.WriteLine("Пароль неправильный. Попробуйте ещё раз!");
| |
| 25 | countOfTry--; | |
| 26 | Console.ReadKey(); | |
| 27 | } | |
| 28 | } | |
| 29 | } | |
| 30 | } | |
| 31 | } |