• 2022-06-26
    将十进制正整数d转换成r(2~9)进制的字符串,下列递归函数正确的是__________。
    A: Function Trans$(ByVal d%, ByVal r%) If d = 0 Then Trans = "" Else Trans = Trans(d \ r, r) & (d Mod r) End If End Function
    B: Function Trans$(ByVal d%, ByVal r%) If d = 0 Then Trans = "" Else Trans = (d Mod r) & Trans(d \ r, r) End If End Function
    C: Function Trans$(ByVal d%, ByVal r%) If d = 0 Then Trans = Trans(d \ r, r) & (d Mod r) Else Trans = "" End If End Function
    D: Function Trans$(ByVal d%, ByVal r%) If d = 0 Then Trans = (d Mod r) & Trans(d \ r, r) Else Trans = "" End If End Function
  • 举一反三