I have a matrix that stores pixels like this:
(0, 0, 255) (0, 255, 0) (255, 0, 0)
(0, 128, 0) (0, 255, 0) (0, 128, 0)
with number of lines 2 and columns 3 [but actually 9 because of pixel r,g,b values] and i have to rotate them so i obtain:
(0, 128, 0) (0, 0, 255)
(0, 255, 0) (0, 255, 0)
(0, 128, 0) (255, 0, 0)
with 3 lines and 2 columns. I also have a restriction: not allowed to use structures, only for-loops. Tried a variety of combinations but none of them is generally correct. Any help will be much appreciated.