某升序排序算法的VB程序段如下:
Dim a(8) As Integer For i = 2 To 8
a(0) = a(i)
Do While a(0) < a(j)
j = j - 1
Loop
Next i
数组元素 a(1)~a(8)的值为随机生成的整数,为实现升序排序,则上述程序段3个方框处的表达式分别为( )
- A、① j = i – 1 ② a(j+1)=a(j) ③ a(j+1)=a(0)
- B、① j = i + 1 ② a(j+1)=a(j) ③ a(0)=a(j+1)
- C、① j = i – 1 ② a(j)=a(j+1) ③ a(j+1)=a(0)
- D、① j = i + 1 ② a(j)=a(j+1) ③ a(0)=a(j+1)