网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
试题35
运行下列程序,在立即窗口显示的结果是()
Private Sub Command0_Click()
Dim I As Single , J As Single
For I= 2 To 10
For J = 2 To I/2
If I mod J = 0 Then Exit For
Next J
If J > sqr (I) Then Debug .Print I;
Next I
End Sub
A.1 5 7 9
B.4 6 8
C.3 5 7 9
D.2 3 5 7
参考答案
更多 “ 试题35运行下列程序,在立即窗口显示的结果是()Private Sub Command0_Click()Dim I As Single , J As SingleFor I= 2 To 10For J = 2 To I/2If I mod J = 0 Then Exit ForNext JIf J sqr (I) Then Debug .Print I;Next IEnd SubA.1 5 7 9B.4 6 8C.3 5 7 9D.2 3 5 7 ” 相关考题
考题
在窗体上画一个名称为Labell的标签,然后编写如下事件过程: Private Sub Form_Click() Dim arr(10,10)As Integer Dim i As Integer,j As Integer For i =2 To 4 For j=2 To 4 arr(i,j)=i*j Next j Next i Labell.Caption=Str(arr(2,2)+arr(3,3)) End Sub 程序运行后,单击窗体,在标签中显示的内容是A. 12B.13C.14D.15
考题
下面程序运行结果是( )。 Private Sub Form_Click() Dim x As Single,y As Single x=InputBox("请输入数据25"):y=InputBox("请输入数据10") Print x+y;InputBox("请输入数据25")+InputBox("请输入数据10") End SubA._35_2510B.25102510C._35_35_D.2510_35_
考题
在窗体上绘制一个名称为Label1的标签,然后编写如下事件过程: Private Sub Form_Click() Dim arr(10,10)As Integer Dim i As Integer,j As Integer For i =2 To 4 For j =2 To 4 arr(i,j)=i*j Next j Next i Label1.Caption=Str(arr(2,2)+arr(3,3)) End Sub 程序运行后,单击窗体,在标签中显示的内容是( )。A.12B.13C.14D.15
考题
下列程序的输出结果是【 】Private Sub Command1_Click()Dim a(1 To 20)Dim iFor i=l To 20a(i)=iNext iFor Each i In a()a (i) =20Next i
考题
设有如下程序: Private Sub Form. Click( ) Dim s As Long,f As Long Dim n As Integer,i As Integer f=1 n=4 For i=1 To n f=f*i s=s+f Next i Print s End Sub 程序运行后,单击窗体,输出结果是( )。A.32B.33C.34D.35
考题
下面程序的输出结果是【 】。Private Sub Commandl_Click( )Dim a(1 To 20)Dim iFori = 1 To 20a(i) = iNext iFor Each i In a( )a(i) = 20Next iPrint a(2)End Sub
考题
下列程序段的运行结果是:Private Sub Command1_Click() Dim n AS Integer I =21: n = 3 do while I>n I=I- n Loop Print IEnd Sub在窗体上打印的结果是______。A.3B.5C.6D.8
考题
阅读下列程序: Private Sub Command1_Click( ) Dim i As Integer,k As Integer k=2 For i=1 To 3 Print H(k); Next i End Sub Function H(j As Integer) a=0 Static b a=a+1 b=b+1 H=a*b+j End Function 程序运行后,单击命令按钮输出结果是A.234B.345C.567D.356
考题
设有如下程序: Private Sub search(a()As Variant,ByVal key As Variant,index%) Dim I% For I = Lbound(a)To Ubound(A)If key=a(I)Then index=I Exit Sub End If Next I index=-1 End Sub Private Sub Form_Load() Show Dim b()As Variant Dim n As Integer b=Array(21,64,92,15,72,38,45,72) Call search(b, 45, n) Print n End Sub 程序运行后,输出的结果是A.2B.6C.10D.12
考题
下列程序的输出结果是【 】。Private Sub Command l Click()Dim a(1 TO 20)Dim iFor i=1 TO 20a(i)=iNext iFor Each i In a()a(i)=20Next iPrint a(2) End Sub
考题
下列程序的输出结果是【 】。Private Sub Command1_Click()Dim a(1 To 20)Dim iFor i=1 To 20a(i)=iNext iFor Each i In a()a(i)=20Next iPrint a(2)End Sub
考题
运行下列程序,在立即窗口显示的结果是( )。 PrivateSub Command0_Click( ) Dim I AsInteger,J AsInteger For I=2To 10 For J=2 To1 If I modJ=0 Then Exit For Next J IfJsqr(I)Then Debug.Print I; Next I End SubA.1579B.468C.3579D.2357
考题
运行下列程序,在立即窗口显示的结果是Private Sub Command0_Click()Dim I As Integer,J As IntegerFor I=2 To 10For J=2 To I/2If I mod J=0 Then Exit ForNext JIf Jsqr(I) Then Debug.Print I;Next IEnd SubA.1 5 7 9B.4 6 8C.3 5 7 9D.2 3 5 7
考题
阅读下列程序。 Private Sub Command1_Click() Dim i As Integer,k As Integer k=2 For i=1 To 3 Print Fun(k); Next End Sub Function Fun(j As Integer) Static b a=0 a=a + 1 b=b + 1 Fun=a*b+j End Function 程序运行后,单击命令按钮输出结果是A.234B.345C.567D.356
考题
Private Sub Commandl Click()Dim i As Integer, j As IntegerDim a (10,10)As IntegerFor i=1 To 3For j= i To 3a(i,j)=(i-1)*3+jPrint a (i,j);Next jPrintNext iEnd Sub程序运行后,单击命令按钮,窗体上显示的是( )。
考题
在窗体上画一个名称为Labell的标签,然后编写如下事件过程。 Private Sub Form_Click( ) Dim arr(10, I0) As Integer Dim i As Integer, j As Integer For i = 2 To 4 For j =2 To 4 arr(i,j) =i*j Next Next Labell. Caption = Str(arr(2,2) + arr(3,3) ) End Sub 程序运行后,单击窗体,在标签中显示的内容是A.12B.13C.14D.15
考题
有如下程序。 Private Sub Commandl_Click() Dim a As Single Dim b As Single a=5:b=4 Call Sub1 ( a,B)End Sub Sub Subl(x As Single, y As Single) t=x x=t\y y = t Mod y End Sub 在调用运行上述程序后,a和b的值分别为A.0 0B.1 1C.2D.1 2
考题
下列程序的输出结果是( )。Private Sub Command1_Click()Dim arr(1 To 10)For i=1 To 10Next iFor Each i In arr()Next iEnd Sub
考题
在窗体上绘制一个名称为Labell的标签,然后编写如下事件过程: Private Sub Form_Click() Dim arr(10,10)As Integer Dim i As Integer,j As Integer For i=2 To 4 For j=2 To 4 arr(i,j)=i*j Next i Next i Labell.Caption=Str(arr(2,2)+arr(3,3)) End Sub 程序运行后,单击窗体,在标签中显示的内容是A.12B.13C.14D.15
考题
阅读程序: 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 s As Integer,k As Integer,i As Integer,n As Integer s=1 fori=1 to 3 forj=i to 3 for k=j to istep-1 s=s*k nextk,J,i print s End SubA.6B.72C.144D.432
考题
运行下列程序,在立即窗口显示的结果是( )。PrivateSub Command0_Click( )Dim I AsInteger,J AsIntegerFor I=2To 10For J=2 To1If I modJ=0 Then Exit ForNext JIfJsqr(I)Then Debug.Print I;Next IEnd SubA.1579B.468C.3579D.2357
考题
设有如下程序:Private Sub Form. Click( )Dim s As Long,f As LongDim n As Integer,i As Integerf=1n=4For i=1 To nf=f*is=s+fNext iPrint sEnd Sub程序运行后,单击窗体,输出结果是( )。A.32B.33C.34D.35
考题
运行下列程序:Private Sub Command1_Click( )Dim A(10) As IntegerFor i = 1 To 5A(i) = iA(i + 5) = iNext iFor i = 1 To 10s = s + A(i)Next iDebug.Print sEnd Sub单击按钮后,则在立即窗口内显示的结果是( )。A.5B.10C.30D.出错信息
考题
以下程序的输出结果是( )。 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 j=1 to 3 p(i)=a(I*j) Next j For I=1 to 3 k=k+p(I)*2 Next I Print k End SubA.33B.28C.35D.37
考题
试题34运行以下程序,显示的结果是()Private Sub Command34_Click()i = 0Doi = i + 1Loop While i 10MsgBox iEnd SubA.0B.1C.10D.11
考题
试题11下列程序的功能是求算式:1-1/2+1/3-1/4+……前30项之和。请在空白处填入适当的语句,使程序可以完成指定的功能。Private Sub Command0_Click()Dim i As Single , s As Single,f As Singles=0 :f=1For i= 1 To 30s=s+f / if=___【11】__Next iDebug.Print “1-1/2+1/3-1/4+……=”;sEnd Sub
热门标签
最新试卷