uses crt;
var i,n,x,kt:longint;
A:array[1..10000] of longint;
begin
clrscr;
write('Nhap so phan tu cua mang: '); readln(n);
for i:=1 to n do
begin
write('Nhap phan tu thu ',i, ' cua mang: '); readln(A[i]);
end;
kt:=0;
write('Nhap X: '); readln(x);
for i:=1 to n do
if A[i]=x then
begin
writeln('Tim thay');
break;
end
else kt:=kt+1;
if kt=n then writeln('Khong tim thay');
readln
end
uses crt;
var i,n,x,d:word;
a:array[1..10000] of word;
begin
clrscr;
write('Nhap so phan tu cua mang: '); readln(n);
for i:=1 to n do begin
write('a[',i,']=');readln(a[i]);
end;
write('nhapx:');readln(x);
d:=0;
for i:=1 to n do
if x=a[i] then begin
inc(d);
writeln('tim thay');
break;
end;
if d=0 then writeln('ko tim thay');
readln
end;
uses crt;
var a:array[1..100]of integer;
n,i,x,kt:integer;
begin
clrscr;
write('nhap so phan tu:'); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
{-----------------------------------------------------}
for i:=1 to n do write(a[i],' ');
{----------------------------------------------------------------}
writeln;
write('nhap so can kiem tra:'); readln(x);
kt:=0;
for i:=1 to n do
if a[i]=x then kt:=1;
if kt=0 then writeln('khong tim thay');
if kt=1 then writeln('tim thay');
readln;
end.