Program hotrotinhoc;
var i,n,k: integer;
a: array[1..32000] of integer;
begin
readln(n);
for i:=1 to n do
read(a[i]);
readln;
readln(k);
for i:=1 to n do write(a[i],' ');
writeln;
for i:=1 to n do
if a[i]=k then write(a[i],' ');
readln
end.
uses crt;
var a,b:array[1..20]of integer;
i,n,k,dem:integer;
begin
clrscr;
randomize;
write('n='); readln(n);
for i:=1 to n do
a[i]:=random(100);
{---------------xuat-gia-tri-cua-cac-phan-tu-trong-mang--------------}
for i:=1 to n do
write(a[i]:4);
{---------nhap-va-ktra-so-k---------------------}
writeln;
write('nhap so k='); readln(k);
dem:=0;
for i:=1 to n do
if a[i]=k then
begin
dem:=dem+1;
b[dem]:=i;
end;
writeln('cac vi tri xuat hien phan tu ',k,' trong day la: ');
for i:=1 to dem do
write(b[i]:4);
readln;
end.