Idea is to take a number as input and print a pattern of boxes
If input is 2, two boxes are to be printed - one inside the other
Smallest box will be of size 3*3, the next bigger box will be 5*5, the next one will be 7*7, so on and so forth
For input 1, then draw a box of dimensions 3*3
For input 2, outer box will be 5*5, inner will be 3*3
For input 3, outer box will be 7*7, with 2 more inner boxes
So for n, outermost box will be n*2 +1 in size, with (n-1) inner boxes
Input Format:
First line of input contains a number N
Output Format:
Print N nested boxes
Constraints:
0 < N < 25
Hi there, I am a professional C/C++/Java software developer. I can give you this program in next 1 hour. You don't have to wait for a day or so. I am CS graduate.