Propram baitap;
Uses crt;
Var i,n,t, vt: integer;
a: array[1..100] of integer;
begin
clrscr;
write(‘Nhap so phan tu n: ‘);
readln(n);
for i:=1 to n do
begin
write(‘a[‘ ,i, ‘]=’);
readln(a[i]);
while a[i] <= 0 do
begin
write(‘ Moi nhap lai a[‘ ,i, ‘]=’);
readln(a[i]);
end;
end;
write(‘ Nhap t: ‘); readln(t);
while t <= 0 do
begin
write(‘ Moi nhap lai t: ‘); readln(t);
end;
vt:=0;
for i:=1 to n do if a[i]=t then
begin
vt:=i;
writeln(vt);
end;
if vt=0 then writeln(' khong co gia tri t trong mang ');
readln;
end.