下列程序的功能是:随机产生10个1—100之间的正整数,按从小到大排序并输出。为了实现这一目标,程序中划线处应填入的合适语句是:
①______________ _
②__________ _____
Const n=10
Dim i As Integer,j As Integer,t As Integer
Dim a(1 to 10) As Integer
For i="1" to 10
_____① _______
Next i
For i="1" to n-1
For j="i+1" to n
If ____②____ Then
k=a(i):a(i)=a(j):a(j)=k
End If
Next j
Next i
For i="1" To n
Print a(i)
Next i
推荐试卷