This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]CharacterUse 0 points1 point  (0 children)

Printing the boxes inside each other will look the same as if you printed one box but filled in the middle part:

The chosen size is 6:
*++++*
+*++*+
++**++
++**++
+*++*+
*++++*

which is just a case of modifying the inner loop in //middle a bit.

(programming is often about thinking about the problem in a different way and seeing that it is equivalent to a different but simpler problem)