当前位置: 高中信息技术 / 单选题
  • 1. (2021·浙江模拟) 有如下VB程序段:

    s1 = "00100100" : s2 = "" : flag = True

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

        ch = Val(Mid(s1, i, 1))

        If flag Then

            s2 = Str(ch) + s2

            If ch = 1 Then flag = False

        Else

            s2 = Str(1 - ch) + s2

        End If

    Next i

    Label1.Caption = s2

    执行该程序段后,标签Label1中显示的内容是(   )

    A . 1 1 0 1 1 0 1 1 B . 1 1 0 1 1 0 0 1 C . 1 1 0 1 1 1 0 0 D . 1 1 0 1 1 0 0 0

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