“gcd(56
举一反三
- 下面是求最大公约数的函数gcd的首部 Function gcd(ByVal x As Integer, ByVal y As Integer) As Integer 若要输出8、12、16这3个数的最大公约数,下列语句中正确的是 A: Print gcd (8,12), gcd(12,6), gcd(16,8) B: Print gcd (8,12,16) C: Print gcd (8), gcd(12), gcd(16) D: Print gcd (8, gcd(12,16))
- 下列计算最大公约数的递归过程,正确的是___________。 A: Sub gcd(ByVal m%, ByVal n%) Dim r% r = m n If r = 0 Then gcd = n Else gcd = gcd(n, r) End If End Sub B: Sub gcd(ByVal m%, ByVal n%) Dim r% r = m Mod n If r = 0 Then gcd = n Else gcd = gcd(n, r) End If End Sub C: Function gcd%(ByVal m%, ByVal n%) Dim r% r = m n If r = 0 Then gcd = n Else gcd = gcd(n, r) End If End Function D: Function gcd%(ByVal m%, ByVal n%) Dim r% r = m Mod n If r = 0 Then gcd = n Else gcd = gcd(n, r) End If End Function
- GCD基于()语言,GCD任务取出遵循队列()原则。
- GCD
- 各三级机构GCD工程分管总是辖区内GCD人才库建设和GCD行销系统培训责任监督人。