Write a single function that takes an integer 'n' as a parameter representing the length of a single side of a square.
Print all the integer coordinate points that make up the square starting at (0,0) and going clockwise around (spiraling to the center). You must not print the same coordinate twice.
Note: The x coordinates increase as you move to the right, and the Y coordinates increase as you go down.
(X,Y) X Increasing ->
+-------------------------
Y |
|
I |
n |
c |
r |
e |
a |
s |
i |
g |
|
| |
\/|
Example:
Square of side 3:
(0,0)
(1,0)
(2,0)
(2,1)
(2,2)
(1,2)
(0,2)
(0,1)
(1,1)
Visual: