[VB](更正:此前理解错误,static在整个程序运行中保留原值,每次调用过程static都应该保留上次原值,答案懒得改了)常见小程序积累
【程序说明】找出两个正整数a和b,使得a
答案:CAB
注:其实求最大公约数的程序,a比b小也同样适用,程序第一次循环就会把顺序倒过来。
【程序】
Dim a As Integer, b As Integer, n As Integer, c As Integer
Private Function Gcd(ByVal a As Integer, ByVal b As Integer
原创
2016-04-10 19:37:09 ·
1151 阅读 ·
0 评论