See if you can fill in what's missing here ... where you see ???? ... and make it work:
class Program
{
static int numberOfSpaces = 3;
static int currentCar = 0;
static int spacesFree = numberOfSpaces;
static string[,] currentCarsParked = new string[numberOfSpaces, 2];
static void Main(string[] args)
{
string name, license;
while (spacesFree > 0)
{
Console.Clear();
ReportStatus();
Console.WriteLine();
Console.Write("Please enter Name: ");
name = Console.ReadLine();
Console.Write("Enter the License plate Number: ");
license = Console.ReadLine();
currentCarsParked[????, 0] = name;
currentCarsParked[????, 1] = license;
currentCar++;
spacesFree--;
}
Console.Clear();
Console.WriteLine("Parking Lot is full !");
Console.WriteLine();
ReportStatus();
Console.WriteLine();
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
private static void ReportStatus()
{
Console.Write("Current Parked Cars: {0}", currentCar);
Console.WriteLine(": Spaces available: {0}", spacesFree);
Console.WriteLine();
for (int i = 0; i < ????; i++)
{
Console.Write("Space: {0}: Car #{1}", i + 1, currentCarsParked[i, 0]);
Console.WriteLine(" License: {0}", currentCarsParked[i, 1]);
}
}
}