实现上述功能的VB程序如下,请在划线处填入合适的代码。
Dim a(1 To 100)As Integer
Dim n As Integer
Private Sub Command1_Click() '生成n个有序数,显示在List1中
’有序代码略
End Sub
Private Sub Command2_ Click)
Dim t As Integer,i As Integer,j As Integer,temp As Integer
t=Val(Text2.Text)
For
Temp=
For j=i To i+1-t Step -1
a(j)=a(j-1)
Next j
Next i
For i=1 To n
List2.AddItem Str(a(i))
Next i
End Sub