Program HOC24;
var n,a,i,d: integer;
x: array[1..32000] of integer;
begin
write('Nhap n: '); readln(n);
for i:=1 to n do
begin
write('Nhap phan tu thu ',i,': '); readln(x[i]);
end;
write('Nhap A: '); readln(a);
d:=0;
for i:=1 to n do if x[i]=a then d:=1;
if d=1 then write(A,' xuat hien trong day') else write(A,' khong xuat hien trong day');
readln
end.
uses crt;
var n,i,a1:integer;
a:array[1..100] of integer;
begin
writeln('nhap n'); readln(n);
writeln('nhap a'); readln(a1);
for i:=1 to n do
begin
readln(a[i]);
if (a[i]=a1) then
begin
write(' so a co xuat hien trong day');
break;
end;
if (i<n) then continue;
writeln('Khong co so a trong day');
end;
readln;
end.
uses crt;
var b:array[1..1000]of longint;n,a,i,d:longint;
begin
clrscr;
write('nhap so phan tu');readln(n);
for i:=1 to n do
begin
write('nhap phan tu thu',i,':');readln(b[i]);
end;
write('nhap so can tim kiem trong day so vua nhap:');readln(a);
d:=0;
for i:=1 to n do if(b[i]=a)then d:=1;
if d=0 then writeln('so',a,'ko co trong day so')else writeln('so',a,'co trong day so');
readln;
end.