编写VB程序,实现上述功能。运行程序,在文本框Text l中输入两位数的个数(不超过100),单击“输出”按钮Command1,在列表框List l输出结果。程序运行界面如图a所示。


请回答下列问题:
(1)通过双击图b中
(2)实现上述功能的VB程序如下,请在划线处填入合适的代码。
(3)程序中加框处代码有错,请改正。
Private Sub Command1Click)
Dim a(1 To 101)As Integer
Dims As String
Dim i As Integer,j As Integer,m As Integer,n As Integer,k As Integer,t As Integer
Randomize
List1.Clear
'生成n个两位正整数并保存到数组a中,代码略
①
For i=1 Ton\2
m= ②
For j=1To m
If a(j)>a(j+1)Then t=a(j):a(j)=a(j+1):a(j+1)=t
Next j
k=m
For j= ③
If a(j)>a(k) Then k=j
Next j
If m<>k Then t=a(m):a(m)=a(k):a(k)=t
Next i
s=""
For j=1 To n
If a(j)\10 Mod 2=1Then s=s+Str(a(j)) Else s=Str(a(j))+s
If Then
List1. AddItem s
s=""
End If
Next j
End 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

