下列程序的功能是:单击窗体时将随机生成10个0~99之间的随机数,并赋值给数组A,然后利用选择法排序;并把排序后的结果输出。 Private Sub Form_Click() Dim A(9) As Integer,i As Integer Dim j As Integer,k As Integer Randomize For i=0 To 9 A(i)=Int(100*Rnd) Next i For i=0 To 8 k=【 】 For j=i To 9 If(A(k)>A(j))Then 【 】 End If Next j If k<>i Then t=A(k):A(k)=A(i):A(i)=t End If Next i For i=0 To 9 Print A(i), Next i Print End Sub
答案不对?请尝试站内搜索