Say that I have array MatrixA which is 2x3 and is filled to 0. How do I set up my loop so that values would be read into it but if the user only enters 3 values, the remaining 3 in MatrixA are 0?
Edit:
const int Q = 2;
const int S = 3;
int matrixA[Q][S] = {0};
for(int i = 0; i < Q; i++){
for(int j = 0; j < S; j++){
cin >> matA[i][j];
}
}