I see, you didn't understand the undefined behaviour of your request as suggested by L B. Can you better expand on what you mean by "squares"? Square boxes, brownie squares, drawing squares or the mathematical application of sqaure ie square root?
The point of a public forum is that other people with a similar problem can find the thread and get help without having to re-ask the same question. Getting help by PM is like shutting out society from getting the same help - it is very rude.
Dude, to make this task easier, I would suggest making a code which you can feed to your program and the program will print the picture with minimum writing.
Ex code is something like:
15*s:7 s:15*s:d\n:r4
Print 15 stars, print 7 spaces, print 15 stars, print newline, repeat 4 times
The easiest method is to actually do what the assignment asks and use recursion.
I would suggest a 2D array of booleans where you set them to true if you intend to draw a star there. A pointer to this 2D array should be passed through each call of the recursive function, possibly with the width and height too.
The function would draw a square (in the 2D array) centered at the given X,Y coordinates with the given Size. It would then call itself on X,Y at each of the corners and with a reduced size.
Basically, you are drawing a fractal to a certain number of iterations. This means you will also need a parameter to know how many iterations are left.