Question #203343

] Write the algorithm of a program that reads the input line-by-line and count the number of lines. Program should terminate when end-of-file (EOF) is reached


Expert's answer

Start
	Declare variable line
	Declare variable lineCounter=0
	while not end-of-file
		read line from the file
		lineCounter=lineCounter+1
	Display the number of lines (lineCounter) in the file
Stop


FIXED


LATEST TUTORIALS
APPROVED BY CLIENTS