VB代码实现如下:
Const n = 10
Dim a(1 To 100) As Integer
Dim b(1 To 100) As Integer
Private Sub Form_Load()
‘随机生产10个11-99之间的数字,并依次存储在数组a中,代码略
End Sub
Private Sub Command1_Click()
Dim num As Integer, L As Integer, R As Integer, i As Integer
Dim m As Integer, f As Boolean
num = 1: b(1) = a(1)
For i = 2 To n
b(num + 1) = a(i) + 1
f = False
For j = 1 To num + 1
If a(i) < b(j) Then
Exit For
ElseIf a(i) = b(j) Then
①
End If
Next j
If Not f Then
For k =
b(k + 1) = b(k)
Next k
②
num = num + 1
End If
Next i
‘最终将数组b的排序结果输出到文本框中,代码略
End Sub
根据如上代码,请回答下列问题: