You're not using an input function that skips whitespace (which includes newlines), are you?
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
Don't you want the newline check inside the inner while loop? You've checked for a '<' followed immediately by a newline if I'm reading that correctly.
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
Enlighten me: if you knew in advance it was so easy why even bother asking and not just think about it yourself and get a solution?
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337