You have you rows and columns mixed up. You have s[i][j]
when it should be s[j][i]
.Also, as far as int s[n-1][m-1];
goes, I believe that you’re initializing this wrong. While an array starts at index 0 and goes to index (size – 1), when you initialize it, it should be array[enteredSize]
, not array[enteredSize - 1]
. Good luck!
3
solved What is wrong with this array input code in C++? [closed]