Turbo Pascal 3 |top| ❲Exclusive ⚡❳
program SearchFile; var f: text; line: string; keyword: string; count: integer; begin writeln('Enter keyword:'); readln(keyword); assign(f, 'DATA.TXT'); reset(f); count := 0; while not eof(f) do begin readln(f, line); if pos(keyword, line) > 0 then begin writeln(line); count := count + 1; end; end; close(f); writeln(count, ' line(s) found.'); end.
Turbo Pascal 3 was the "machine gun" in an era of "muzzle-loading muskets". It cost only turbo pascal 3