Skip to content

drghostling/Console-Csharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

Console-C# -Password Controller with Colors

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;

namespace HesapBloke { class Program { static void Main(string[] args) { int yanlisgirmesayisi = 0;

        menu:
        Console.WriteLine("Wellcome to System !");
        Console.Write("Please enter your password !");
        string sifre = Console.ReadLine();

        if (sifre == "doruk123")
        {
            Console.ForegroundColor = ConsoleColor.Blue;
            Console.Write("Successful");
        }
        else
        {
            yanlisgirmesayisi = yanlisgirmesayisi + 1;
            if (yanlisgirmesayisi >= 3)
            {
                Console.ForegroundColor = ConsoleColor.White;
                Console.Write("Account Blocked");
            }
            else{
            Console.ForegroundColor = ConsoleColor.Red;
            Console.Write(yanlisgirmesayisi + "Your Password is Wrong");
            Console.ForegroundColor = ConsoleColor.Gray;
            goto menu;
        }
        }
        Console.ReadKey();

    }
}

}

Password Control

About

Password Control

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published