> 其他 >
用流程图求两个数m和n的最大公约数
人气:354 ℃ 时间:2020-06-17 06:45:36
解答
function GetMaxYueShu(M,N:Integer):Integer;beginResult := 0;for I:=Min(M,N)-1 downto 0 beginif (I mod M=0)and(I mod N=0) then beginResult := I;Exit;endend;end;
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版