Help me please!)
in the text file "T" to determine the number of exclamation marks included in the even lines. print the lines in which these characters are greater than 2. Here is my version, but PascalABC writes a Runtime Error: System.IO.FileNotFoundException: File 'E: \ in.txt' was not found. What to do?
program new; uses crt; var f: text; s: string; i,k,ns: integer; begin assign(f,'E:\in.txt'); reset(f); writeln('Количество "!" в четных строках:'); while not (eof(f)) do begin inc(ns); readln(f,s); if ns mod 2=0 then begin k:=0; for i:=1 to length(s) do if s[i]='!' then inc(k); writeln(ns,' строка - ',k); end; end; reset(f); writeln('Четные строки, в которых количество "!" больше 2:'); while not (eof(f)) do begin inc(ns); readln(f,s); if ns mod 2=0 then begin k:=0; for i:=1 to length(s) do if s[i]='!' then inc(k); if k>2 then writeln(s); end; end; close(f); readln; end.