C++ Code on designing an image

Hi!
I was designing this code but I face bit problem the first two lines of this code execute fine but the next “$” are displayed but not in the same way I was expecting. Can anybody will help me designing this code in such a way that I may get the “$” in the following manner.
$ $ $ $
$ $
$ $
$ $ $ $
