int numbs[4][4] =
1, 2, 3, 4
5, 6, 7, 8
9, 10, 11, 12
13, 14, 15, 16;
When i print it, it should print like this.
1 2 3 4, 8, 12,16, 15, 14, 13, 9, 5, 6, 7, 11, 10, (ie clockwise direction spiral):
---\ //first right, then down, left, up and repeat
/-\|
|-/|
\--/
Here’s my stab at it:
The output is:
edit: Works for both even and odd sized square matrices now.