Ответ:
Объяснение:
1.
var
a:array[1..1000] of integer;
i, n:integer;
count:integer;
begin
writeln('Input n = ');
readln(n);
for i:=1 to n do begin
writeln('Input a[', i, '] = ');
readln(a[i]);
end;
count:=0;
i:=1;
while (i
if (((a[i] mod 3) = 0) and ((a[i] - (a[i] div 10)*10) = 2)) then count:=count + 1;
i:=i+1;
end;
writeln(count);
readln;
end.
2.
var
a:array[1..1000] of integer;
i, n:integer;
count:integer;
begin
writeln('Input n = ');
readln(n);
for i:=1 to n do begin
writeln('Input a[', i, '] = ');
readln(a[i]);
end;
count:=0;
i:=1;
repeat
if (((a[i] mod 3) = 0) and ((a[i] - (a[i] div 10)*10) = 2)) then count:=count + 1;
i:=i+1;
until (i > n);
writeln(count);
readln;
end.