I thought this problem had a trivial solution, couple of for loops and some fancy counters, but apparently it is rather more complicated.
So my question is, how woul
I think this can be a solution for any type of matrix.
#include #define M 3 #define N 4 main(){ int a[M][N] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9,10,11,12}}; int i, j, t; for( t = 0; t=0 ; --i, ++j) if( (i