网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有如下程序:
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
A.1
B.2
C.3
D.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单击命令按钮,程序运行结果为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()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()Dim FirStr As StringFirSt="abcdef"Print Pat(FirStr)End SubPrivate Function Pat(xStr As String) As StringDim tempStr As String,strLen As IntegertempStr=""strLen=Len(xStr)i=1Do While i<=Len(xStr)-3tempStr=tempStr+Mid(xStr,i,1)+Mid(xStr,strLen-i+1,1)i=i+1LoopPat=tempStrEnd FunctionA.abcdefB.afbecdC.fedcbaD.defabc
考题
有如下程序: 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
考题
下列程序的执行结果为 Ptivate Sub Commandl_Click() Dim FirStr As String FirStr="abcdef" Print Pct (FirStr) End Sub Private Function Pct(xStr As String)As String Dim tempStr As String,strLen As Integer tempStr="" strLen=Len(xStr) i=1 Do While i<=Len(xStr)-3 tempStr=tempStr + Mid(xStr,i,l) + Mid(xStr,strLen - i+i ,1) i=i + 1 Loop Pct=tempStr End FunCtionA.abcdefB.afbecdC.fedcbaD.defabc
考题
有如下程序: 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
考题
14、有如下程序段,该程序段运行后Label1中显示的内容为______。 Dim x$, y% x = "boy or girl?" y = Len(x) If y < 11 Then Label1.Text = "I am " Mid(x, 1, 3) Else Label1.Text = "I am " Mid(x, 8, 4) End IfA.boy or girl?B.I am boyC.I am girlD.I am boy or girl?
考题
有如下程序段,该程序段运行后Label1中显示的内容为______。 Dim x$, y% x = "boy or girl?" y = Len(x) If y < 11 Then Label1.Text = "I am " Mid(x, 1, 3) Else Label1.Text = "I am " Mid(x, 8, 4) End IfA.boy or girl?B.I am boyC.I am girlD.I am boy or girl?
热门标签
最新试卷