Answer to Question #203343 in Algorithms for M Kamran

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


1
Expert's answer
2021-06-05T02:14:00-0400
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


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS