meu primeiro commit carinhoso
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
namespace Qual_a_senha;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkBlue;
|
||||
Console.WriteLine("Digite a senha:");
|
||||
string senha = Console.ReadLine();
|
||||
string senhasecreta = "dragao";
|
||||
while (senha != senhasecreta)
|
||||
{
|
||||
if (senha != senhasecreta)
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine("...Senha invalida");
|
||||
senha = Console.ReadLine();
|
||||
}
|
||||
|
||||
Program.VerificarSenha(senha);
|
||||
|
||||
}
|
||||
|
||||
static bool VerificarSenha(string senha)
|
||||
{
|
||||
string senhasecreta = "dragão";
|
||||
if (senha == "dragao")
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkGreen;
|
||||
Console.WriteLine($"Senha correta {senhasecreta} Acesso Permitido");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user