当前位置: 高中信息技术 / 单选题
  • 1. (2020·浙江模拟) 以下VB 程序段的功能是:单击一次按钮Command1,在列表List1 中随机输出一行10个大小写字母。已知字母“A”和“a”的ASCII码值分别为65和97。

    Private Sub Command1_Click()

    Dim s As String, c As String, i As String, a As String, t As Integer

    Randomize

    s = “”

    For i = 1 To 10

                  

    If a <= 26 Then

    t = a + 64

    Else

                  

    End If

    c = Chr(t)

    s = s + c

    Next i

    List1.AddItem s

    End Sub

    以上横线处的正确语句是(  )

    A . ①a=Int(Rnd * 52 + 1)  ②t = a + 70 B . ①a=Int(Rnd * 52)  ②t = a + 71 C . ①a=Int(Rnd * 52 + 1)  ②t = a + 72 D . ①a=Int(Rnd * 52)  ②t = a + 73

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