static double initialamount = 1000;
static double finalamount = 0;
static int successAttempt = 0;
static int failedAttempts = 0;
public static void Main(string[] args)
finalamount = initialamount;
while(failedAttempts<=3 && successAttempt==0)
Console.WriteLine("Please type in your username:");
string username = Console.ReadLine();
Console.WriteLine("Please type in your password:");
int password = Convert.ToInt32(Console.ReadLine());
data(username, password);
public static void data(string a, int b)
string[] Username = { "abc", "def", "ghi" };
int[] Password = { 123, 456, 789 };
for (int z = 0; z < Username.Length; z++)
for (int j = 0; j < Password.Length; j++)
Console.WriteLine("Successful Login");
Console.WriteLine("Check your username and/or password");
Console.WriteLine("Number of attempts succeeded " + successAttempt);
Console.WriteLine("Number of attempts failed " + failedAttempts);
Console.WriteLine("Login attemp more than three times. Try later!");