i want a square to disply as my out put
the user has to enter the width n a character
the out put should be somthg like this:
can someone help me on this?Code:****** * * * * ******
i want a square to disply as my out put
the user has to enter the width n a character
the out put should be somthg like this:
can someone help me on this?Code:****** * * * * ******
i made a mistake with the square ...it should look like a square!!
there is a hole in the middle
Do you know how to program with loops? Digest this:
You'll have to work out the details of course. You could also use width fields to eliminate the inner-most for loop, but, one thing at a time .Code:call DrawHorizontalEdge FOR each inner row print "*" FOR each space needed to achieve desired width print " " ENDFOR print "*" ENDFOR call DrawHorizontalEdge
gg
thnx!
i dont mean to sound like a sissy but can u break it down some more?
more pseudocode follows:
Code:from 0 to n, if 0 or (n-1) draw the whole line ('*' n times) \n else draw 1 '*', followed by ' ' (n-2) times, followed by 1 '*' \n endfrom
thank u!!!