当前位置: 高中信息技术 / 单选题
  • 1. (2020高三下·金华月考) 有如下VB程序段:

    Function GCD(m As Long, n As Long) As Long

     Dim temp As Long, r As Long

     If m < n Then temp = m: m = n: n = temp

     d = m - n

     Do While d <> n

      If d >= n Then

        m = d

      Else

        m = n

        n = d

      End If

      d = m - n

     Loop

     GCD = n

    End Function

    Private Sub Command1_Click()

      Text1.Text = Str(GCD(48,36))

    End Sub

    程序运行完后,单击Command1按钮,文本框Text1中显示的是 (  )

    A . 12 B . 18 C . 36 D . 48

微信扫码预览、分享更方便