Uses Crt;
Var i,n,m:integer;
a:array[1..100] of integer;
Begin
Clrscr;
Write('Nhap n = ');
Readln(n);
For i:=1 to n do
Begin
Write('A[',i,'] = ');Readln(a[i]);
End;
m:=A[1];
For i:=2 to n do If A[i]<m then m:=A[i];
Writeln(m);
Readln;
End.
viết lại nha
Var i,n,m:integer;
a:array[1..100] of integer;
Begin
Write('Nhap n = ');
Readln(n);
For i:=1 to n do
Begin
Write('A[',i,'] = ');
Readln(a[i]);
End;
m:=A[1];
For i:=2 to n do If A[i]>m then m:=A[i];
Writeln(' So lon nhat trong day la: ',m);
Readln;
End.