var A : array [10..80] of integer;
var N, x, i, c, k : integer;
begin
readln(N);
for i:=1 to N do begin
A[i] := i;
read(A[i]);
end;
readln(x);
c := 0;
for k:=1 to N do
if A[k] = x then begin
c := c + 1;
writeln(c);
end.
Объяснение:
var A : array [10..80] of integer;
var N, x, i, c, k : integer;
begin
readln(N);
for i:=1 to N do begin
A[i] := i;
read(A[i]);
end;
readln(x);
c := 0;
for k:=1 to N do
if A[k] = x then begin
c := c + 1;
end;
writeln(c);
end.
Объяснение: