求m、n的最大公约数 用流程图表示

579277461 1年前 已收到1个回答 举报

dunniao 幼苗

共回答了17个问题采纳率:94.1% 举报

function GetMaxYueShu(M,N:Integer):Integer;
begin
Result := 0;
for I:=Min(M,N)-1 downto 0 begin
if (I mod M=0)and(I mod N=0) then begin
Result := I;
Exit;
end
end;
end;

1年前

1
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 17 q. 0.074 s. - webmaster@yulucn.com