program loe_fail; var s: string; f: text; i: integer; begin writeln('Kirjuta failinimi, mida soovid lugeda!'); readln(s); {$I-} assign(f, s); reset(f); {$I+} if IOResult<>0 then begin writeln('Fail ',s,' puudub!'); exit; end; i:=1; while not eof(f) do begin readln(f, s); writeln(i,'. ',s); i:=i+1; end; end.