I am starting to use matrices and I made an exercise to make a 3X3 table, that the user fills them and then shows the table but when he executed the program he shows me in a part numbers he does not enter. If you find the error, explain to me that I'm wrong.
#include <iostream>
using namespace std;
int main( ) {
int a[2][2], columna, fila;
for( fila = 0; fila < 3; fila++ ) {
for( columna = 0; columna < 3; columna++ ) {
cout << "introduzca el numero de la fila [" << fila << "] y de la columna [" << columna << "]:" << endl;
cin >> a[fila][columna];
}
}
for( fila = 0; fila < 3; fila++ ) {
for( columna = 0; columna < 3; columna++ ) {
cout << a[fila][columna] << "|";
}
cout<<endl;
}
return 0;
}