các bạn có thể trả lời nhanh đc ko??? mk đag cần gấp.
program UCLN;
uses crt;
var a,b:integer;
begin
clrscr;
writeln('Moi ban nhap so a:=');readln(a);
writeln('Hay nhap so b:='):readln(b);
While a<>b do
if (a>b) then a:=a-b else b:=b-a;
write('Uoc chung lon nhat la ',a or b);
readln;
end.
program dam_nhau_khong;
uses crt;
var h,k:integer;
begin
clrscr;
writeln('nhap so h: '); readln(h);
writeln('nhap so k: '); readln(k);
while (h<>k) do
if (h>k) then h:=h-k else k:=k-h;
writeln('uoc chung lon nhat la: ',h);
end.