Created
May 29, 2025 23:47
-
-
Save shioriiiik/9d4270ef48f36ae1a04989e51b4b7130 to your computer and use it in GitHub Desktop.
1.7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Data; | |
namespace Variables | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int triesCount = 3; | |
string password = "123321"; | |
string userInput; | |
for (int i = 0; i < triesCount; i++) | |
{ | |
Console.WriteLine("Введите пароль"); | |
userInput = Console.ReadLine(); | |
if (userInput == password) | |
{ | |
Console.WriteLine("Момчик на пудже- мета"); | |
break; | |
} | |
else | |
{ | |
Console.WriteLine("Введён неверный пароль"); | |
Console.WriteLine("У вас осталось попыток " + (triesCount - i - 1)); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment