public static void Main(string[] args)
string[] usernames = { "angel17", "cardod", "johnnys" };
string[] passwords = { "ang123", "probin", "ph" };
for(int attempts=0; attempts<3;attempts++)
Console.WriteLine("Enter username: ");
string uname = Console.ReadLine();
Console.WriteLine("Enter password: ");
string pass = Console.ReadLine();
for(int i=0; i<usernames.Length;i++)
if (uname == usernames[i])
if(userFound && pass == passwords[foundIndex]){
Console.WriteLine("Logged in successfully");
Console.WriteLine("Invalid username and/or password");