小刘设计了一个排序算法,该排序算法会将数组a中奇数位的元素从小到大排列,偶数位的元素从大到小排列,程序界面如图,算法的VB程序段如下:
Private Sub Command2_Click()
Dim i As Integer, j As Integer, tmp As Integer
Dim s1 As String, t As Integer, s2 As String
t=1
For i=1 To n-2
For j= To n Step 2 ‘改错
If a(i)*t>a(j)*t Then
tmp =a(i): a(i)= a(j): a(j)=tmp
End if
Next j
‘填空①
Next i
For i =1 To n
If Then ‘填空②
s1 =s1 Str(a(i))
Else
s2=s2+Str(a(i))
End If
Text2. Text=“奇数位:”+s1
Text3. Text=“偶数位:”+s2
End Sub
回答以下问题: