[单选题]

程序段如下:Private Sub Command1_ Click() a = 0 for 1=15 To 15 Step- 2 a = a +1 Next I Print a, IEnd Sub发生Command 1的单击事件后,程序的输出结果是 ______。

A.0 13

B.15 13

C.0 15

D.15 15

参考答案与解析:

相关试题

设有如下程序:Private Sub Command1_ Click() Dim

[单选题]设有如下程序: Private Sub Command1_ Click() Dim sum As Double, x As Double sum=0 n=0 For i=1 To 3 x=n/i n=n+1 sum=sum+x Next i End Sub 该程序通过For循环来计算sum的值,sum值的精确结果是( )。A.1+1/2+2/3B.1+1/2+1/3+1C.1/2+2/3D.1/2+1/3

  • 查看答案
  • 给出下面的程序:Private Sub Command1_ Click()Dim

    [单选题]给出下面的程序:Private Sub Command1_ Click() Dim Check, Counter Check= True: Counter = 0 do do while Counter < 20 Counter = Counter +1 if Counter = 10 then Check=False exit do End if Loop Loop until Check=False MsgBox CounterEnd Sub 程序最后弹出的消息对话框的内容是______。A

  • 查看答案
  • 有如下程序段:Private Sub Command1_Click( ) Dim

    [单选题]有如下程序段:Private Sub Command1_Click( ) Dim a As Integer a=2 For i=1 To 3 Print G(A)Next iEnd SubFunction G(a As Integer) b=0 Static c b=b + 1 c=c + 1 G=a + b + cEnd Function运行上面的程序后,单击命令按钮,输出结果为A.1 2 3B.2 3 4C.4 5 6D.1 4 6

  • 查看答案
  • 下列事件过程:Private Sub Command1_ Click()MsgB

    [单选题]下列事件过程:Private Sub Command1_ Click() MsgBox Str (123+123)End Sub运行时,信息框中出现的结果是______。A.123+123B.123C.246D.显示出错信息

  • 查看答案
  • 现有如下程序:Private Sub Command1_Click() s=0

    [单选题]现有如下程序: Private Sub Command1_Click() s=0 For i=1 To 5 s=s+f(5+i) Next Print s End Sub Public Function f(x As Integer) If x>=10 Then t=x+1 Else t=x+2 End If f=t End Function 运行程序,则窗体上显示的是( )。A.38B.49C.61D.70

  • 查看答案
  • 有如下程序:Option base 1Private Sub Command1_

    [单选题]有如下程序:Option base 1Private Sub Command1_ClickD.im arr(10)A.rr=Array(10,35,28,90,54,68,72,90)F.or Each a In arrIf a>50 thenSum=sum+aE.nd IfNext aE.nd Sub运行上述程序时出现错误,错误之处是A.)数组定义语句不对,应改为Dim arrB.)没有指明For 循环的终值C.)应在For语句之前增加sum=0D.)Next a 应改为next

  • 查看答案
  • 有如下程序: Private Sub Command1_Click()a$="

    [单选题]有如下程序:Private Sub Command1_Click()a$="A WORKER IS HERE"x=Len(a$)F.or i=1 To x - 1b$=Mid$(a$, i, 3)If b$="WOR" Then S=S + 1NextPrint SE.nd Sub单击命令按钮,程序运行结果为A.1B.2C.3D.5

  • 查看答案
  • 有如下程序:Private Sub Command1_Click()a$="

    [单选题]有如下程序:Private Sub Command1_Click()a$="A WORKER IS HERE"x=Len(a$)F.or i=1 To x-1b$=Mid$(a$,i,3)If b$="WOR",Then S=S+1NextPrint SE.nd Sub单击命令按钮,程序运行结果为AA.1B.2C.3D.5

  • 查看答案
  • 有如下程序。 Private Sub Command1_Click()Dim a

    [单选题]有如下程序。Private Sub Command1_Click()D.im a As SingleD.im b As Singlea=5: b=4C.all Sub1(a, b)E.nd SubSub Sub1(x As Single, y As Single)t=xx=t / yy=t Mod yE.nd Sub在调用运行上述程序后,a和b的值分别为A.0 0B.1 1C.2 2D.1 2

  • 查看答案
  • 有如下程序:Private Sub Command1_Click() a$="

    [单选题]有如下程序: Private Sub Command1_Click() a$="A WCIRKER IS HERE" x=Len(a$) For i=1 To x-1 b$=Mid$(a$,i,3) If b$="WOR"Then S=S+1 Next Print S End Sub 单击命令按钮,程序运行结果为A.1B.2C.3D.5

  • 查看答案
  • 程序段如下:Private Sub Command1_ Click()a = 0