I have been asked to draw an ASCII house, however I am running into trouble making my stories.
Here is what I need clarification on:
Can I make a do/while loop inside a for loop?
I have been asked to draw an ASCII house, however I am running into trouble making my stories.
Here is what I need clarification on:
Can I make a do/while loop inside a for loop?
yes you can
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
> Can I make a do/while loop inside a for loop?
Yes.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
The assignment specifically asked for houses though
I finally figured out how to do storey, the problem here is the windows.
So far what it displays to me is this:
| |
| |
| |
| |
| |
| |
| |
-------------------------
do I draw the windows as the program draws the walls?
*damn it wont display the exact picture that my program draws :\
Last edited by The Geeky Coder; 07-13-2013 at 09:58 AM.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
To make your output keep it's correct format, put [*code] Your Drawing or code here [*/code], we call them code tags, around what you want. Remove the *'s, to make them work.
Unfortunately, the display won't be quite precise, because even between the code tags, some kerning is done to enhance spacing - but it will massively help.Code:= / \ / \ / \ / \ /=========\ | | | ▓▓ | | ____ | | |░░| | | |░░| | ===========
Best to draw out what you want, and then construct the house in a house[][] array of chars, from top to bottom. Then print out each row of the house array, until you're happy with it.
Last edited by Adak; 07-13-2013 at 10:52 AM.
Is this a colleague of yours?
Need a little help with this program
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Here is another question, how do I read alphabets?