I would much appreciate some help with my assignment for programming class.
We have to populate a two dimensional NxN array with random numbers from 10 to 99 and print it on the screen. So far so good :)
Now this array must be rotated by 90 degrees clockwise and again printed on screen. Here is where I'm stuck. I've read that it can be done by transposing and reversing, but how?
Here is what I have so far (just the random number generation and original array printing).
@Thomas1965
Thanks, but I guess I suck at this. :(
I can't figure out from the link how to do it.
There are tips how to rotate array with one line, but I need it like this:
OK. I've changed the code. Now I'm not using functions.
I've got it to rotate, but to the wrong side - it's rotating counter-clockwise, but I need it clockwise. Just need a small pointer to why is that.