Const n = 20
Dim a(1 To n) As Integer
Dim lena As Integer '数组a的实际长度 Dim s As String
Private Sub Form_Load()
'生成lena个非递减序列,并输出到文本框text1中,代码略
End Sub
Private Sub Command1_Click()
Dim i As Integer, j As Integer i = 1
Do While i < lena
If a(i) <> a(i + 1) Then i =
Else
For j = i + 1 To lena
a(j - 1) =
Next j
lena =
End If
Loop
s = ""
For i = 1 To lena
s = s + Str(a(i))
Next i
Text2.Text = s
End Sub