用選擇法按遞增順序排序
Private Sub Command1_Click()
Dim a(1 to 6) as integer,i%,j%,amin%,t%
For i=1 to 6
a(i)=InputBox(“給數(shù)組元素賦值”)
[ 6 ]
n=6
For i=1 to [ 7 ]
amin= [ 8 ]
For j= [ 9 ] to n
If a(j)<a(amin) then [ 10 ]
Next j
t=a(i)
a(i)=a(amin)
a(amin)=t
Next i
End Sub
免責(zé)申明 --------------------------------------------------------------------------------------
以上內(nèi)容僅代表原創(chuàng)者觀點,其內(nèi)容未經(jīng)本站證實,中華考試網(wǎng)對以上內(nèi)容的真實性、完整性不作任何保證或承諾,轉(zhuǎn)載目的在于傳遞更多信息,由此產(chǎn)生的后果與中華考試網(wǎng)無關(guān);如以上轉(zhuǎn)載內(nèi)容不慎侵犯了您的權(quán)益,請聯(lián)系我們
![](/Images2.0/lianxi.gif)
,我們將會及時處理。