|
Lets say I have.. int matrix[5][5]={{0,0,0,0,0},{1,1,1,1,1},{2,2,2,2,2},{3,3,3,3,3},{4,4,4,4,4}}; How do I manipulate this matrix to make it look like... {{0,0,0,0,0},{0,0,0,0,0},{1,1,1,1,1},{2,2,2,2,2},{3,3,3,3,3}} then {{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{1,1,1,1,1},{2,2,2,2,2}} and so on..... What I basically want to do is shift every row down by one or up by one. Any suggestions???
|