( ?。?/div>
( )
Dim a(20)As Integer,i As Integer
Dim j As Integer,temp As Integer
Prin“排序前:”
For i=1 To 20
a(i)=Int(Rnd*100)+1
Print a(i);
Next i
Print
For i=1 To 19
For
j=i+1
j=i+1
To 20
If
(j)>a(i)
(j)>a(i)
Then
t=a(i)
a(i)=a(j)
a(j)=t
a(j)=t
End If
Next j
Next i
Print“排序后:”
For i=1To 20
Print a(i);
Next i
End Sub
(1)程序中橫線處①應(yīng)填入
j=i+1
j=i+1
.
(2)程序中橫線處②應(yīng)填入
(j)>a(i)
(j)>a(i)
.
(3)程序中橫線處③應(yīng)填入
a(j)=t
a(j)=t
.