[填空題] 下列程序為比較排序法排序程序,請補充完該程序(該程序?qū)?0個數(shù)值數(shù)據(jù)進行排序處理)。 Dim a(1 To 10)AS Integer Privat
2021-07-20
[填空題] 下列程序為比較排序法排序程序,請補充完該程序(該程序?qū)?0個數(shù)值數(shù)據(jù)進行排序處理)。 Dim a(1 To 10)AS Integer Private Sub Form _Click() Randomize p=“” For i = 1 To 10 Do x = Int (Rnd * 90) + 10 yes = 0 For j = 1 To 【9】 If x = a(j) Then yes = 1: Exit For Next Loop While yes = 1 a(i) = x Next i For i = 1 To 9 For 【10】 To 10 If a(i) > a(j) Thent = a(i)【11】 a(j) = t End If Next j Next i p = Str(a(1)) For i = 2 To 10 p = p & “,” & Str(a(i)) Print p Next i End Sub
正確答案:[9] i-1 [10] j=1 [11] a(i)=a(j)
詞條內(nèi)容僅供參考,如果您需要解決具體問題
(尤其在法律、醫(yī)學等領(lǐng)域),建議您咨詢相關(guān)領(lǐng)域?qū)I(yè)人士。