for( int i = 0 ; i < m ; i++ ) { for( int j = 0 ; j < n ; j ++ ) { if( i == 0 && j >= 0 ) { akm[i][j] = j + 1 ; } else if( i > 0 && j == 0 ) { akm[i][j] = akm[i-1][1] ; } else if( i > 0 && j > 0 ) { akm [i][j] =akm[i][j-1] ; } } }