✔ 最佳答案
try following function lcm
program LCMPas;
function lcm(a,b:longint):longint;
var t:longint;
begin
if a<b then begin
t:=a;a:=b;b:=t;
end;
lcm:=a;
while lcm mod b>0 do inc(lcm,a);
end;
begin
write( lcm( 120, 30 ) );
end.
OK?
2008-10-03 16:39:37 補充:
RUN唔到是甚麼原因,可否詳細道來.