2 câu trả lời
Hàm USCLN(a,b)
function uscln(a,b:integer):integer;
begin
while a<>b do
if a>b then a:=a-b else b:=b-a;
uscln:=a;
end;
Hàm BCNN(a,b)
function bcnn(a,n:integer):integer;
begin
bcnn:=a*b;
while a<>b do
if a>b then a:=a-b else b:=b-a;
bcnn:=bcnn div a;
end;
Function ucln(x, y: word): word;
Begin
while x<>y do
if x>y then x:=x-y
else y:=y-x;
ucln:=x;
End;
Function bcnn(x, y): longword;
Begin
bcnn:=x*y div ucln(x, y);
End.