Uses crt; var a,b:longint; begin clrscr; write(‘a=’);readln(a); write(‘b=’);readln(b); if (a<=b) then if b mod a=0 then writeln(a,’ la uoc cua ‘,b) else writeln(a,’ khong uoc cua ‘,b) else if a mod b=0 then writeln(b,’ la uoc cua ‘,a) else writeln(b,’ khong uoc cua ‘,a); readln end.
program kiemtrauoc;
uses crt;
var a,b:integer;
begin
clrscr;
write(‘Nhap so thu nhat: ‘); readln(a);
write(‘Nhap so thu hai: ‘); readln(b);
if a mod b=0 then write(b,’ la uoc cua ‘,a)
else if b mod a=0 then write(a,’ la uoc cua ‘b)
else write(‘Khong phai la uoc cua nhau’);
readln
end.
Uses crt;
var a,b:longint;
begin
clrscr;
write(‘a=’);readln(a);
write(‘b=’);readln(b);
if (a<=b) then
if b mod a=0 then writeln(a,’ la uoc cua ‘,b)
else writeln(a,’ khong uoc cua ‘,b) else
if a mod b=0 then writeln(b,’ la uoc cua ‘,a)
else writeln(b,’ khong uoc cua ‘,a);
readln
end.
Có gì bạn thử nha :33333