pgm 13.11, no need to test for newline in loop termination condition