程序填空:程序采用选择法对数组元素进行从大到小排序。请将题目[填空]处的内容补充完整,使程序完成指定的功能。Private Sub Command1_Click() Dim iA(1 To 6),i%,j%,k%,n% n = 6 iA(1) = 8: iA(2) = 6: iA(3) = 9: iA(4) = 3: iA(5) = 2: iA(6) = 7 For i = 1 To n - 1 k=i For j = ______ To n If iA(j) > iA(k) Then ______ End If Next j t = iA(i) ______ iA(k) = t For m = 1 To n Print iA(m); Next m Print Next iEnd Sub答案2: 答案3:
举一反三
- 【填空题】运行下面程序,其输出结果为 void main() { int iA 1, iA 2, iA 3=258; iA 1=97 ; iA 2=98; printf(" iA 1=%c, iA 2=%c, iA 3=%c", iA 1, iA 2, iA 3); } (7.0分)
- 设Ia,Ib,Ic为一组工频负序电流,当采样频率是600HZ时,采样电流表示为Ia(0),Ib(0),Ic(0);Ia(1),Ib(1),Ic(1);Ia(2),Ib(2),Ic(2);…Ia(12),Ib(12),Ic(12);Ia(13),Ib(13),Ic(13);…。下列正确的等式是() A: Ia(3)=Ib(9)=Ic(12) B: Ia(2)=Ib(10)=Ic(6); C: Ia(4)=Ib(8)=Ic(4); D: Ia(7)=Ib(8)=Ic(16);
- Which of the following is monodirectional slab? A: Ia/Ib≥2 B: Ia/Ib≤2 C: Ia/Ib≤1.5 D: Ia/Ib≤1
- 中国大学MOOC: 有如下程序段: Dim i%, j%, n%, m%, k% m = 0 : k = 0 For i = 1 To 5 k = k + 1 n = 0 For j = 1 To 2 n = n + 1 m = m + 1 Next j Next i MsgBox(k & & n & & m)运行该程序代码段后,消息对话框中显示的内容为( )。
- 有如下程序段: Dim i%, j%, n%, m%, k% m = 0 : k = 0 For i = 1 To 5 k = k + 1 n = 0 For j = 1 To 2 n = n + 1 m = m + 1 Next j Next i MsgBox(k & " " & n & " " & m)运行该程序代码段后,消息对话框中显示的内容为( )。 A: 5 10 2 B: 5 10 10 C: 5 2 10 D: 5 2 2