Private Sub Command1_Click ( ?。?br />Dim i As Integer Randomize For i=1 To 100 f(i)=False Next i n=Val(Text1.Text) For i=1 To n t=Int(Rnd*100+1) Do While f(t)=True
t=Int(Rnd*100+1)
t=Int(Rnd*100+1)
Loop f(t)=True Next i j=0 For i=1 To 100 If
f(i)=True
f(i)=True
Then j=j+1 a(j)=i List1.AddItem Str(i) End If Next i End Sub Private Sub Command2_Click ( ?。?br />Dim b(1 To 100)As Integer,k As Integer,c As Integer,max As Integer Dim s As String Dim j As Integer n=Val(Text1.Text) max=0 For k=1 To n i=1:j=n:c=0 Do While i<=j m=(i+j)\2:c=c+1 If c>max Then max=c If m=k Then b(m)=c:Exit Do If m<k Then i=m+1 Else j=m-1 Loop Next k For i=1 To max s=““ For j=1 To n If
b(j)=i
b(j)=i
Then s=s+Str(a(j)) Else s=s+““ End If Next j List2.AddItem s Next i End Sub (2)當(dāng)數(shù)據(jù)是11,22,33,44,55,66,77,88,99時(shí),第3行第3個(gè)數(shù)為