Some of the above formating has been butchered by the forum but hopefully the general idea is there.
Edit your post and look for the format options to the right of the editbox. Highlight your code and click the one that says "code", it looks like this: <>
if (lineCount == (1||5||9||13||17||21||25||29||33))
//it doesn't work that way
//try
if( lineCount % 4 == 1 )
//--------------------------------------------------
//What's happening is
(1||5||9|| ... ||33) //is evaluating to
(true||true||true|| ... ||true) //which of course is just plain
true //and then
lineCount == true //is evaluating either to
lineCount == 1 //or
lineCount != 0 //Whoops!
1 2 3 4 5 6
elseif (lineCount == (2||3||4||6||7||8||10||11||12||14||15||16||18||19||20||22||23||24||26||27||28||30||31||32))
//same thing here
//try
elseif( lineCount % 4 != 1) //or better yet just plain
else
1 2 3 4 5 6
while( ... ) {
...
continue;
//You don't need the last line of your loop to be continue;
// that's what loops do!
}
1 2 3 4 5 6 7 8
//Why are these three variables defined in global scope (i.e. outside the main method?)
char withPlus[50]="+-----+-----+-----+-----+-----+-----+-----+-----+";
char wOutPlus[50]="| | | | | | | | |";
int lineCount=1;
int main() {
...
}