Write code for, given a non-negative integer , printing a nested square of size , as shown in the examples.
The program must implement and use the NESTED-SQUARE function, which must be iterative and is not allowed to perform input/output operations.
Make one submission with Python code and another submission with C++ code.
The input is an integer .
The output is a nested square of size .
Input
1
Output
*
Input
2
Output
** **
Input
12
Output
************ * * * ******** * * * * * * * **** * * * * * * * * * * * * * * * * **** * * * * * * * ******** * * * ************