Bài 1:
uses crt;
var c:aray[1..200]of integer;
i,vt1,vt2:integer;
begin
clrscr;
for i:=1 to 200 do
begin
write('C[',i,']='); readln(c[i]);
end;
for i:=1 to 200 do
if c[i]>0 then
begin
vt1:=i;
break;
end;
if vt1=0 then writeln('Khong co so duong trong day')
else writeln('So duong dau tien trong day la: ',c[vt1],' va chi so cua no la: ',vt1);
for i:=200 downto 1 do
if c[i]>0 then
begin
vt2:=i;
break;
end;
if vt2=0 then writeln('Khong co so duong trong day')
else writeln('So duong cuoi cung trong day la: ',c[vt2],' va vi tri cua no la: ',vt2);
readln;
end.