using System.Collections.Generic;
public static void Main()
string[] username = new string[0];
string[] password = new string[0];
int[] balance = new int[0];
Array.Resize(ref username, username.Length + 1);
username[username.Length - 1] = "test";
Array.Resize(ref password, password.Length + 1);
password[password.Length - 1] = "test1";
Array.Resize(ref balance, balance.Length + 1);
balance[balance.Length - 1] = 1000;
Console.WriteLine($"{balance[0]}");
for(int i=0; i < username.Length; i++)
if(username[i] == "test" && password[i] == "test1")
balance[loggedIndex] = balance[loggedIndex] - 500;
Console.WriteLine($"{balance[0]}");