1:
uses crt;
var a:array[1..100]of integer;
i,n,max:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
max:=a[1];
for i:=1 to n do
if max<a[i] then max:=a[i];
writeln(max);
readln;
end.
program oken;
uses crt;
var a: array [1..100] of integer;
i,n,max:integer;
begin
clrscr;
write('nhap so n: '); readln(n);
for i:=1 to n do
begin
write('a[',i,']: ');
readln(a[i]);
end;
b,
program aicaohon;
uses crt;
var Nhi, Tram,An:real;
begin
clrscr;
write('nhap chieu cao cua Nhi=');readln(Nhi);
write('nhap chieu cao cua Tram='); readln(Tram);
if Nhi>Tram then writeln('Ban Nhi cao hon');
if Tram>Nhi then writeln('Ban Tram cao hon')
if An>Tram>Nhi then writeln( 'Ban An cao nhat')
else writeln('An cao nhat');
readln
end.
max:=a[1];
for i:=2 to n do
if a[i]>max then
max:=a[i];
writeln('Max: ',max);
readln;
end.
2:
uses crt;
var a:array[1..3]of real;
i:integer;
max:real;
begin
clrscr;
for i:=1 to 3 do
begin
write('Nhap chieu cao cua ban thu ',i,':'); readln(a[i]);
end;
max:=a[1];
for i:=1 to 3 do
if max<a[i] then max:=a[i];
writeln(max);
readln;
end.