#include #include using namespace std; const int TotalRows=5, TotalColumns=4; void ParkingIn(string arr[][TotalColumns], string plate, int Rows, int Columns) { if (arr[Rows][Columns] == "") arr[Rows][Columns] = plate; else cout << "This spot is already occupied." << endl; } void ParkingOut(string arr[][TotalColumns], int Rows, int Columns) { if (arr[Rows][Columns] == "") cout << "This spot is not occupied." << endl; else arr[Rows][Columns] = ""; } void PrintStatus(string arr[][TotalColumns]) { for (int j = 0; j < TotalRows; j++) { for (int i = 0; i < TotalColumns; i++) { if (arr[j][i] == "") cout << "________"; else cout << arr[j][i]; cout << " "; } cout << endl; } } int main(){ string plate, arr[TotalRows][TotalColumns]={}; int in, out, Rows, Columns; cin >> in; for(int i=0; i> plate >> Rows >> Columns; ParkingIn(arr, plate, Rows, Columns); } cin >> out; for(int i=0; i> Rows >> Columns; ParkingOut(arr, Rows, Columns); } PrintStatus(arr); }