] 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
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
Comments
Leave a comment