请阅读程序:Sub subP(b()As Integer)For i=1 To 4b(i)=2*iNext iEnd SubPrivate Sub Command 1_Click()Dim a(1 To 4)As Integera(1)=5:a(2)=6:a(3)=7:a(4)=8subP a()For i=1 To 4Print a(i)Next iEnd Sub运行上面的程序,单击命令按钮,则输出结果是( )。A.2 4 6 8B.5 6 7 8C.10 12 14 16D.出错

请阅读程序:

Sub subP(b()As Integer)

For i=1 To 4

b(i)=2*i

Next i

End Sub

Private Sub Command 1_Click()

Dim a(1 To 4)As Integer

a(1)=5:a(2)=6:a(3)=7:a(4)=8

subP a()

For i=1 To 4

Print a(i)

Next i

End Sub

运行上面的程序,单击命令按钮,则输出结果是( )。

A.2 4 6 8

B.5 6 7 8

C.10 12 14 16

D.出错


相关考题:

请阅读程序:Option Base 1Pfivate Sub Form_Click()Dim Arr(4,4)As IntegerFor i=1 To 4For j=1 To 4Arr(i,j)=(i-1)*2+jNext jNext iFor i=3 To 4For j=3 To 4Print Arr(j,i);Next jPrintNext iEnd Sub程序运行后,单击窗体,则输出结果是( )。A.5 7 6 8B.6 8 7 9C.7 9 8 10D.8 10 8 11

阅读程序: Sub p( b () As Integer)For i =1To 4 b(i) = 2(iNext i End Sub Private Sub Command1_Click()Dim a (1 To 4) As Integer a(1)=5 a(2)=6 a(3)=7 a(4)=8 call p (a) For i=1 To 4 Print a(i) Next iEnd Sub运行上面的程序,单击命令按钮,输出结果为。

下列程序段的执行结果是【 】。For I = 1 to 5CllsPrint "I =" , INEXT

请阅读程序: Sub subP(b( )As Integer) For i=1 To4 b(i)=2*i Next i End Sub Private Sub Commandl Click( ) Dim a(1 To 4)As Integer a(1)=5:a(2)=6:a(3)=7:a(4)=8 subP a( ) For i=1 To 4 Print a(i) Next i End Sub 运行上面的程序,单击命令按钮,则输出结果是( )。A.2 4 6 8B.5 6 7 8C.10 12 14 16D.出错

请阅读程序. 0ption Base 1 Private Sub Fo,m Click( ) Dim Arr(4,4)As Integer For i=1 To 4 For j=1 To 4 Arr(i,j)=(i=1)*2+j Next j Next i For i=3 To 4 For j=3 To 4 Print Arr(j,i); Next j Print Next i End Sub 程序运行后,单。旨窗体,则输出结果是( )。A.5 7 6 8B.6 8 7 9C.7 9 8 10D.8 10 8 11

阅读程序 SUB P(B( ) AS INTEGER) FOR I=1 TO 4 B(I) =2*I NEXT I END SUB PRIVATE SUB COMMAND1_CLICK( ) DIM A( 1 TO 4) AS INTEGER A(1)=5 A(2) =6 A(3) =7 A(4) =8 P A( ) FOR I = 1 TO 4 MSGBOX A(I) NEXT I END SUB 运行上面的程序,单击命令按钮COMMAND1后,消息框4次输出的内容分别是( )。A.出错B.10, 12, 14, 16C.5, 6, 7, 8D.2, 4, 6, 8

请仔细阅读程序,将程序的执行结果详细的写出来。注意字符和标点符号的书写 #include <stdio.h> int main() { int i,j=4; for(i=j;i<=2*j;i++) switch(i/j) { case 0: case 1: printf("*");break; case 2: printf("#"); } return 0; }

以下代码符合MATLAB语法的是()A.for i=1:10 i++ endB.While (i<10) i=i+1; endC.while (i<10) { i=i+1; }D.for i=1:10 i end

以下不正确的循环语句是________。A.i=1 Do s=s+i: i=i+1 Loop While i<=10B.i=1 Do While i<=10 s=s+i: i=i+1 LoopC.i=1 Do While i<=10 s=s+i: i=i+1 Next iD.For i=1 To 10 s=s+i Next