Bài 1:
Program hotrotinhoc_hoc24;
var a,b,tg: integer;
begin
write('Nhap so dau tien : '); readln(a);
write('Nhap so thu hai : '); readln(b);
while b<>0 do
begin
tg:=a mod b;
a:=b;
b:=tg;
end;
write('Uoc chung lon nhat cua 2 so la : ',a);
readln
end.
Bài 2:
Program hotrotinhoc_hoc24;
var i,n,max: integer;
a: array[1..32000] of integer;
begin
write('Nhap n='); readln(n);
max:=0;
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
if a[i]>max then max:=a[i];
end;
write('So lon nhat trong cac so da nhap la : ',max);
readln
end.