public static void Main()
Random random = new Random();
string[] userName = new string[5];
int[] password = new int[5];
for (userNameIndex = 0; userNameIndex <= 4; userNameIndex++)
a = random.Next(26) + 65;
b = random.Next(26) + 65;
c = random.Next(26) + 65;
string s = Convert.ToString(x);
string t = Convert.ToString(y);
string u = Convert.ToString(z);
userName[userNameIndex] = s + t + u;
for (passwordIndex = 0; passwordIndex <= 4; passwordIndex++)
def = random.Next(800) + 100;
password[passwordIndex] = def;
Console.WriteLine("User, Pwd");
Console.WriteLine(userName[i] + ", " + password[i]);
while (count < 3 && found == false)
Console.WriteLine("Please enter your userName:");
enteredName = Console.ReadLine();
Console.WriteLine("Please enter your password:");
enteredPassword = int.Parse(Console.ReadLine());
while (userNameIndex < 5 && found == false)
if (userName[userNameIndex] == enteredName && password[userNameIndex] == enteredPassword)
userNameIndex = userNameIndex + 1;
Console.WriteLine("Welcome to the System.");
Console.WriteLine("Sorry. Access denied.");