//Pascal ABC.NET Версия 2.2 Сборка 790 var f:text; a,i,n:integer; ars:array of string; begin; assign(f,'text.txt'); reset(f); while not Eof(f) do begin; inc(n); setlength(ars,n+1); readln(f,ars[n]); end; close(f); for i:=1 to n do if pos('!',ars[i])<>0 then a:=a+1; writeln(a); end.
var f:text;
a,i,n:integer;
ars:array of string;
begin;
assign(f,'text.txt');
reset(f);
while not Eof(f) do
begin;
inc(n);
setlength(ars,n+1);
readln(f,ars[n]);
end;
close(f);
for i:=1 to n do
if pos('!',ars[i])<>0 then a:=a+1;
writeln(a);
end.
Пример text.txt:
890 823 23 232 23
436434!
346643
21
Пример вывода:
1