Iteration numbers

Oct 13, 2014 at 5:16am
My lecturer gives me an assignment to input a number, then make the output like this example:

input: 5

12345
12341
52152
43453
32154

It's 12345 and then repeats again vertically on the right side and then repeat again horizontally on the bottom to the left and repeat again upside forming like a square until the center, using for or while. I've been thinking about this for a week and have no idea how to make this.
Thank you.
Oct 13, 2014 at 6:16am
Search for "print a matrix in spiral order".
Oct 13, 2014 at 6:55am
-edit: it was kinda wrong-
Last edited on Oct 13, 2014 at 10:37pm
Oct 13, 2014 at 7:09am
@keskiverto Thanks, I'll search it when I have time. Still have some classes.

@poteto Thanks for the reply, but I don't understand...?
Oct 13, 2014 at 10:41pm
Topic archived. No new replies allowed.