

Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
uses crt;
var a,b,ucln,bcnn,i:integer;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
ucln:=1;
if a
for i:=1 to a do
if (a mod i=0) and (b mod i=0) then
begin
if ucln
end;
end else begin
for i:=1 to b do
if (a mod i=0) and (b mod i=0) then
begin
if ucln
end;
end;
bcnn:=a*b;
for i:=a*b-1 downto 1 do
if (i mod a=0) and (i mod b=0) then
begin
if bcnn>i then bcnn:=i;
end;
writeln('Uoc chung lon nhat la: ',ucln);
writeln('Boi chung nho nhat la: ',bcnn);
Hãy giúp mọi người biết câu trả lời này thế nào?
uses crt;
var a,b,t: int64;
begin
clrscr;
readln(a,b);
while b <> 0 do
begin
t := b;
b := a mod b;
a := t;
end;
write(a)
end.
Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin
16
1839
5
chạy chương trình giúp mik nha