Is the rotation always 2 places? Are you using c or c++?
I suggest using 2 temporary variables to hold the last 2 variables, (3 and 4)
Then rotate the rest of the matrix. Then put values 3 and 4 back in.
Is the rotation always 2 places? Are you using c or c++?
I suggest using 2 temporary variables to hold the last 2 variables, (3 and 4)
Then rotate the rest of the matrix. Then put values 3 and 4 back in.
Thank you very much for your reply. I am using C. cant we do without matrix this program ?
Comment