当前位置: 高中信息技术 / 单选题
  • 1. (2020高三上·杭州期中) 有如下程序段,在Text1中输入1001011,Text2中输出的结果为(   )

    Private Sub Command1_Click()

    Dim s As String, i As Integer, d As Integer

    d=0

    s = Text1.Text

    For i = Len(s) To 1 Step -1

      d = (d \ 2 + Val(Mid(s, i, 1)) * 2 ^ (Len(s) - 1))

    Next i

    Text2.Text = Str(100-d)

    End Sub

    A . 75 B . 25 C . -25 D . 50

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