网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

运行下面的程序后,输出的结果为 Cls Dim t(5,5) as Integer For i=1 To 5:t(i,i)=1:Next For i=1 To 5 For j=1 To 5 Print t(i,j), Next j Print Next I

A.1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 l 1 1 1 1 1 1

B.1 1 l 1 1

C.1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1

D.1 1 1 1 1


参考答案

更多 “ 运行下面的程序后,输出的结果为 Cls Dim t(5,5) as Integer For i=1 To 5:t(i,i)=1:Next For i=1 To 5 For j=1 To 5 Print t(i,j), Next j Print Next IA.1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 l 1 1 1 1 1 1B.1 1 l 1 1C.1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1D.1 1 1 1 1 ” 相关考题
考题 下列程序段的执行结果为 ______。 Dim m(3,3)As Integer Dim i As Integer Dim j As Integer Dim x As Integer For i=1 To 3 m(i,i)=i Next For i=0 To 3 For j=0 To 3 x=x+m(i,j) Next Next Print xA.3B.4C.5D.6

考题 有以下程序: Sub subP(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(i)=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 6D.出错

考题 有以下程序: Sub subP(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 subPa() 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.出错

考题 阅读程序: 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运行上面的程序,单击命令按钮,输出结果为。

考题 下面运行程序后,单击命令按钮,输出的结果是 【 】 。Private Sub Command1_Click()Dim a%(1 To 5),i%, s#For i=1 To 5a(i)=iNexts=Fun(a)Print "s="; s;End SubFunction Fun(a() As Integer)Dim t#, i%t=1For i=LBound(a) To UBound(a)t=t  a(i)NextFun=tEnd Function

考题 下面程序:________Option Base 1Private Sub Command1_Click() Dim a(10),p(3)As Integer Dim i,k As Integer k=5 For i=1 To 10 a(i)=i Next For i=1 To 3 p(i)=a(i*i) Next For i=1 To 3 k=k+p(i)*2 Next Print kEnd Sub运行后的输出结果为________。A.33B.28C.35D.37

考题 在窗体上画—个命令按钮(其名称为Command1),然后编写如下事件过程: Private Sub Command1_Click() Dim a(5,5)As Integer Dim i As Integer,j As Integer For i=1 To 3 For j=1 To 3 a(i,j)=(i-1)*3+j Print a(i,j) Next j Print Next i End Sub 程序运行后,单击命令按钮,在窗体上的输出结果是:_______。A.1 4 7 2 5 8 3 6 9B.1 2 3 4 5 6 7 8 9C.1 2 3 4 5 6 7 8 9D.没有输出

考题 阅读下列程序: Function func(n As Integer)As Integer Sum = 0 For i = 1 To n Sum = Sum + (i + 1)* i Next i func = Sum End Function.Private Sub Command1_Click () Dim a As Integer a= 5 s = func (A)Print s End Sub 程序运行后,单击命令按钮,输出的结果为A.80B.60C.70D.15

考题 运行下面的程序后,输出的结果为 Cls Dim t(5, 5) as Integer For i=1 To 5: t(i,i) =1: Next For i = 1 To 5 For j = 1 To 5 Print t(i, j), Next Print NextA.1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1B.1 1 1 1 1C.1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1D.1 1 1 1 1

考题 运行下面的程序后,输出的结果为 Cls Dim t(5,5)as Integer For i=1 To 5:t(i,i)=1:Next For i=1 To 5 For j=1 To 5 Print t(i,j), Next Print NextA. 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1B.1 1 1 1 1C.1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1D.1 1 1 1 1

考题 下面程序段,运行后的结果是 Private Sub Commandl_Click( ) Dim b%(1 To 4),i%,t# For i=1 To 4 b(i)=i Next i t=Tof(b( ) ) Print"t=";t, End Sub Function Tof(a() As Integer) Dim t#,i% t=1 For i=2 To UBound(A)t=t * a(i) Next i Tof=t End FunctionA.t=18B.t=24C.t=30D.t=32

考题 有下面的程序段,其功能是按图1所示的规律输出数据: Dim a(3,5)As Integer For i=1 To 3 For j=1 To 5 a(i,j)=i+j Print a(i,j); Next Print Next若要按图2所示的规律继续输出数据,则接在上述程序段后面的程序段应该是( )。A.For i=1 To 5 For j=1 To 3 Print a(j,i); Next Print NextB.For i=1 T0 3 For j=1 To 5 Print a(j,i); Next Print NextC.For j=l To 5 For i=1 To 3 Print a(j,i); Next Print NextD.For i=1 To 5 For=1 To 3 Print a(i,j): Next Print Next

考题 下面运行程序后,单击命令按钮,输出出的结果是【 】。Private Sub Command1_Click( )Dim a% (1 To 5) ,i%, sFor i = 1 To 5a(i) =iNexts = Fun(a)Print"s="; s;End SubFunction Fun(a() As Integer)Dim t, i%t=1For i = LBound(A0To UBound(a)t=t * a(i)NextFun =tEnd Function

考题 若有以下程序,当程序运行后,单击命令按钮,则输出的结果为( )。 Private Sub Command1_Click() Dim a%(1 To 4), b%(3 To 6), i%, s1#, s2# For i= 1 To 4 a(i) = i Next i For i=3 To 6 b(i) = i Next i s1 = Factorial (A) s2 = Factorial (B) Print "s1="; s1; "s2="; s2 End Sub Function Factorial(a() As Integer) Dim t#, i% t=1 For i = LBound(A)To UBound(A) t = t * a(i) Next i Factorial = t End FunctionA.s1=360 s2=24B.s1=24 s2=360C.s1=24 s2=24D.s1=360 s2=360

考题 有下列程序,程序运行后单击命令按钮,则输出的结果为( )。Private Sub Command1_Click()Dim a%(1 To 4),b%(3 To 6),i%,s1#,s2# For i=1 To 4 a(i)=i Next i For i=3 To 6 b(i)=i Next i s1=Factorial(A) s2=Factorial(B)Print "s1=";s1;"s2=";s2End SubFunction Factorial(a()As Integer)Dim t#,i% t=1 For i=LBound(A)To UBound(A) t=t*a(i) Next i Factorial=tEnd FunctionA.s1=360 s2=24B.s1=24 s2=360C.s1=24 s2=24D.s1=360 s2=360

考题 下面程序段,运行后的结果是 Private Sub Command1_Click() Dim b%(1 To 4),i%,t# For i=1 To 4 b(i) =i Next t=Tof(b() ) Print"t=";t, End Sub Function Tof(a() As Integer) Dim t#,i% t=1 For i=2 To UBound(a) t=t*a(i) Next Tof=t End FunctionA.t=18B.t=24C.t=30D.t=32

考题 单击一次命令按钮之后,下更程序代码的执行结果为______ 。 Public Sub Proc(a() As Integer) Static i As Integer Do a(i) = a(i) + a(i + 1) i=i+1 Loop While i < 2 End Sub Private Sub Command1_Cliek() Dim m As Integer Dim i As Integer Dim x(10) As Integer For i = 0 To 4 x(i) = i + 1 Next i For i = 1 To 2 Call Proc (x) Next i For i = 0 To 4 Print x(i); Next i End SubA.3 4 7 5 6B.3 5 7 4 5C.1 2 3 4 5D.1 2 3 5 7

考题 在窗体上面1个名称为Command1的命令按钮,然后编写下列事件过程 Option Base 1 Private Sub,Command1 Click( ) Dim a(5,5)ks Integer For i=1 To j For j=1 To 5 a(i,j)=(i+j)*5\10 Next j Next i S=0 For i=1 To j s=s+a(i,i) Next i Print s End Sub 程序运行后,单击命令按钮,输出结果是( )。A.15B.13C.11D.9

考题 阅读程序: Function fac(ByVal As Integer)As Integer Dim temp As Integer temp=1 For i%=1 To n temp=temp*i% Next i% fac=temp End Function Private Sub Form. Click( ) Dim nsum As Integer nsum=1 For i%=2 T0 4 nsum=nsum+fac(i%) Next i% Print nsum End Sub 程序运行后,单击窗体,输出结果是( )。A.35B.31C.33D.37

考题 阅读程序: Option Base 1 Dim arr() As Integer Private Sub Form. Click() Dim i As Integer,i As Integer ReDim arr(3,2) For i=1 To 3 For j=1 To 2 arr(i,j)=i*2+j Next j Next i ReDim arr(3,2)+arr(3,4) End Sub 程序运行后,单击窗体,输出结果为A.21B.13C.8D.25

考题 下面程序运行时,单击窗体后,窗体上显示的结果是( )。 Private Sub Form_Click Dim I As Integer Dim sum As Long Dim t1 As Long t1=1:sum=0 For 1=1 To 3 t1=t1*I sum=sum+t1 Next I Print sum End SubA.3B.9C.5D.6

考题 在窗体上画一个命令按钮,然后编写如下程序: Option Base 1 Private Sub Command1 Click() Dim Arr1(12)As Integer, Arr2(3)As Integer Dim Sum As Integer Sum = 2 For i=1 To 12 Arrl(i)= i Next i For i=1 To 3 Arr2(i)= Arrl(i*i) Next i For i = 1 To 3 Sum = Sum + Arr2(i) Next i Print Sum End Sub 程序运行后,单击命令按钮,在窗体上的输出结果为A.16B.24C.32D.36

考题 下列程序段的执行结果为______。 Dim m(3,3)As Integer Dim i As Integer Dim j As Integer Dim x As Integer For i=1 To 3 m(i,i)=i Next For i=0 T0 3 For j=0 To 3 x=x+m(i, j) Next Next Print xA.3B.4C.5D.6

考题 以下程序运行后,消息框的输出结果是( )。 OPTION BASE 1 PRIVATE SUB COMMAND1_CLICK( ) DIM A(10) , P(3) AS INTEGER K=5 FOR I=1 TO 10 A(I) = I NEXT I FOR I=1 TO 3 P(I)=A(I*I) NEXT I FOR I=1 TO 3 K=K+P (I) ~ 2 NEXT I MSGBOX K END SUBA.33B.28C.35D.37

考题 阅读程序:Function fac(ByVal As Integer)As IntegerDim temp As Integertemp=1For i%=1 To ntemp=temp*i%Next i%fac=tempEnd FunctionPrivate Sub Form. Click( )Dim nsum As Integernsum=1For i%=2 T0 4nsum=nsum+fac(i%)Next i%Print nsumEnd Sub程序运行后,单击窗体,输出结果是( )。A.35B.31C.33D.37

考题 下列程序打印结果为 ______。Private Sub Command1_ Click() Dim a(5)As String Dim b As Integer Dim i As Integer for i = 0 To 5 a(i)= i +1 Print a(i); Next iEnd SubA.12345B.6C.1 2 3 4 5 6D.0

考题 下面程序运行后,单击命令按钮,输出的结果是______。Private Sub Command1_Click()Dim a%(1 To 5),i%,sFor i=1 To 5a(i) =iNexts=Fun(A)Print "s=";s;End SubFunction Fun(a() As Integer)Dim t,i%t=1For i=LBound(A)To UBound(A)t=t*a(i)NextFun=tEnd Function