Bài 1:
uses crt;
var a:array[1..100]of integer;
n,i,min:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
min:=a[1];
for i:=1 to n do
if min>a[i] then min:=a[i];
writeln('So nho nhat la: ',min);
readln;
end.
Bài 2:
uses crt;
var a,n:integer;
begin
clrscr;
a:=0;
n:=1;
while a<=500 do
begin
a:=a+n;
inc(n);
end;
writeln('A=',a);
writeln('N=',n);
readln;
end.