program hello
a=0
b=0
t=0
print *,'input a'
read *,a
print *,'input b'
read *,b
a=abs(a)
b=abs(b)
if(a.lt.b) then
t=a
a=b
b=t
end if
1 t=mod(a,b)
if(t.le.0) then
goto 2
end if
a=b
b=t
goto 1
2 print *,b
end
求两个整数的最大公约数,纯属娱乐,哈哈哈~
本文通过一个简单的编程示例展示了如何使用Python计算两个整数的最大公约数,并以一种轻松幽默的方式呈现。
1087

被折叠的 条评论
为什么被折叠?



