28.以下Visual Basic程序的功能是:計算表達式1×3+2×3+3×3+…100×3的值,并在文本框abc中輸出計算結果. Private Sub Command1_Click ( ?。?br />Dim i As Integer,s As Integer s=0 i=1 Do While i<=100 s=s+i*3 i=i+1 Loop ①_______=Str(s) End Sub 問:(1)為了實現上述表達式的計算,①處橫線處應填入
Option Explicit Const MAXSIZE=1000 Dim d(MAXSIZE+1)As Integer,n As Integer Private Sub Command1_Click ( ) Dim i As Integer,j As Integer n=Val(txtSize.Text) If n<=0Or n>MAXSIZE Then txtSize=“數據個數必須大于0!“ Exit Sub End If Randomize lstUnsorted.Clear For i=1To n j=Int(32768*Rnd) lstUnsorted.AddItem Str$(j) d(i)=j Next Command2.Enabled=True End Sub Private Sub Command2_Click ( )'冒泡 Dim i,j,TEMP,NextElement lstSorted.Clear For i=1to n-1 For ①Step-1 If d(j)<d(j-1)Then TEMP=d(j) ② d(j-1)=TEMP End If Next Next For i=1To n lstSorted.AddItem d(i) Next End Sub 問:為了實現上述冒泡算法的實現,橫線處應填入 ①