有一组数据(共n*n)个,分别存放在a(1)至a(n*n)中,将这些数据平均分为n段,通过下列程序实现n段数据升序排序,例如,当n=4时,排序结果如图所示:
For i = 1 To ①
k = i
For j = i + 1 To ②
If a(j) < a(k) Then k = j
Next j
If k <> i Then
t = a(k)
a(k) = a(i)
a(i) = t
End If
s = s + Str(a(i))
If ③ Then
List1.AddItem s: s = ""
End If
Next i
划线处的代码应为( )
- A、① n*n ② ((i - 1) \ 4 + 1) * 4 ③ i Mod 4 = 0
- B、① n*n ② (i \ 4) * 4 ③ i \ 4 = 0
- C、① n*n-1 ② ((i - 1) \ 4 + 1) * 4 ③ i Mod 4 = 0
- D、① n*n-1 ② (i \ 4) * 4 ③ i \ 4 = 0