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

有如下程序:

Private Sub Command1_Click()

a$= "A WORKER 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.1

B.2

C.3

D.5


相关考题:

下面程序运行后,窗体中显示【 】。Private Sub Command1_Click) ( )aS ="*" :b$ ="$"For k = 1 To 3x$ =Strings (Len(a$) +k,b$ )Print x $;NextPrintEnd Sub

执行下面的程序段,x的值为【 】。Private Sub Command1_Click()For i=1 To 9a=a+iNextx=Val(i)MsgBox xEnd Sub

(7)在窗体上画一个命令按钮,其名称为 Command1,然后编写如下事件过程:Private Sub Command1_Click( )a$="National Computer Rank Examination"n=Len(a$)s=0For i=1 To nb$=Mid(a$, i, 1)If b$="n" Thens=s+1End IfNext iPrint sEnd Sub程序运行后,单击命令按钮,输出结果是 【7】 。

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

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

有如下程序: Private Sub Command1_Click() as="A WORKER 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 Commandl_Click( ) a$="A WORKER 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$="A WORKER IS OVER THERE" x=Len(a $) For i=1 To x-1 b$=Mid $(a $,i,2) If b $="ER"Then s=s+1 Next i Pdnt s End Sub 程序运行后的输出结果是A.1B.2C.3D.4

(27)设有如下程序Private Sub Command 1_Click()x=10:Y=0For i=1 To SDox=x-2y=y+2Loop Until y>5 Or x<-1NextEnd Sub运行程序,其中Do循环执行的次数是A)15B)10C)7D)3