试题

试题 试卷

logo

题型:单选题 题类:常考题 难易度:普通

浙江省台州市2017-2018学年高三上学期信息技术期末质量评估卷

【加试题】某算法的VB程序段如下:

  Dim a(1 T0 5)As Integer

  Dim c As Integer

  a(1)=44:a(2)=36:a(3)=58:a(4)=65:a(5)=12

  b=0:c=0

  For i=1 To 4

      k=i

    For j=i+1 To 5

        If a(j)<a(k) Then

          k=j

          b=b+1

         End If

      Next j

      If k<>I Then

      t=a(i):a(i)=a(k):a(k)=t

      c=c+1

    End If

  Next i

  Text1.Text=Str(b)+Str(c)

运行该程序段后,文本框Text1的内容是 (  )

A、53 B、44 C、43 D、34
举一反三
返回首页

试题篮