
实现上述功能的VB程序如下,但加框处代码有错,请改正。
Const n = 10
Dim a(1 To n) As Integer
Private Sub Command1_Click()
Dim i As Integer, j As Integer, t As Integer, bottom As Integer
'获取排序前数据依次存储在数组a 中,并在文本框Text1 中显示。代码略
bottom = n : i = 1
Do While i <= bottom - 1
For j = bottom To i + 1 Step -1
If
t = a(j): a(j) = a(j - 1): a(j - 1) = t
ElseIf a(j) = a(j - 1) Then ' 相邻两个数据相等,进行剔除处理

bottom = bottom - 1
End If
Next j
i = i + 1
LoopText2.Text = " "
For i = 1 To bottom
Text2.Text = Text2.Text + Str(a(i))
Next iEnd Sub

同类型试题

y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2


y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2

