楚
楚辞
Unregistered / Unconfirmed
GUEST, unregistred user!
zxgbs(x,y: Cardinal): Cardinal; var m,n: Cardinal;begin m := x * y; n := y; if x < y then begin y := x; x := n; end; while n > 0 do begin n := x mod y; x := y; if n > 0 then y := n; end; Result := m div y;end;以下我手工翻译的假设x=6,y=100M=600;N=100;6<100;Y=6;X=100;100>0;N=4(100除以6的余数)X=64>0 then y=4End;Result=600/4我算出来=150.程序算出来是300.我的是错误的....