有如下程序: 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
有如下程序: 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.1
B.2
C.3
D.4
相关考题:
下面程序运行后,窗体中显示【 】。Private Sub Command1_Click) ( )aS ="*" :b$ ="$"For k = 1 To 3x$ =Strings (Len(a$) +k,b$ )Print x $;NextPrintEnd Sub
在窗体上添加一个名称为Command1的命令按钮,然后编写如下程序:Private Sub f(ByVa1 x As Integer)x=x+4End SubPrivate Sub Command1_Click()i=3Call f(1)If i>4 Then i=i*2MsgBox iEnd Sub打开窗体运行后,单击命令按钮,则消息框的输出结果为______。
以下能够正确计算n!的程序是( )。A.Private Sub Command1_Click()n=5: x=1Dox=x * II=I + 1Loop While I nPrint xEnd SubB.Private Sub Command1_Click()n=5: x=1: I=1Dox=x * II=I + 1Loop While I nPrint xEnd SubC.Private Sub Command1_Click()n=5: x=1: I=1Dox=x * II=I + 1Loop While I =nPrint xEnd SubD.Private Sub Command1_Click()n=5: x=1: I=1Dox=x * II=I + 1Loop While I nPrint xEnd Sub
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Sum=0 For x=1 To 5 Call subl(x, s) Sum=Sum+s Next x Print Sum End Sub Private Sub subl(y, w) w=1 For i=1 To y w=w*i Next i End Sub 程序运行后。单击命令按钮,则窗体上显示的内容是______。A.5B.120C.153D.160
有如下程序: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
(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】 。
在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序:Private Sub f(ByVal x As Integer)x=x+4End SubPrivate Sub Command1_Click()i=3Call f(i)If i>4 Then i=i*2End Sub窗体打开运行后,单击命令按钮,则消息框的输出结果为( )。
在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim Y as StringX=5Y=X Space(3) XPrint X;Print Trim(Y);Len(Trim(Y))End Sub该程序的执行结果是【 】。
下列程序的执行结果为 Private Sub Command1_Click Dim FirStr As String FirSt="abcdef" Print Pat(FirStr. End Sub Private Function Pat(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, 1)+Mid(xStr, strLen -i+1, 1) i=i+1 Loop Pat=tempStr End FunctionA.abcdefB.afbecdC.fedcbaD.defabc
有如下程序:Private Sub Command1_Click()j =10For i= -1 To 1 Step 0.3j =j + 1Next iPrint jEnd Sub该程序共循环【 】次,程序执行完毕后j的值是【 】。
以下能够正确计算n!的程序是A.Private Sub Command1_Chck( ) n=5:x=1 Do x=x*i i=i+1 Loop While i<n Print x End SubB.Private Sub Command1_Click( ) n=5:x=1:i=l Do x=x*i i=i+1 Loop While i<n Print x End SubC.Private Sub Command1_Click( ) n=5:x=1:i=l Do x=x*i i=i+1 Loop While i<=n Print x End SubD.Private Sub Command1_Click( ) n=5:x=1:i=l Dox=x*i i=i+1 Loop While i>n Print x End Sub
以下能够正确计算n!的程序是A.Private Sub Command1 Click() n=5:x=1 Do x=x * I I=I + 1 Loop While I < n Print x End SubB.Private Sub Command1_Click() n=5:X=1:I=1 Do X=X*I I=I + 1 Loop While I <n Print x End SubC.Private Sub Command1_Click() n=5:X=1:I=1 Do X=X * I I=I + 1 Loop While I<=n Print X End SubD.Private Sub Command1_Click() n=5:X=1:I=1 Do x=x * I I=I + 1 Loop While I>n Print X End Sub
以下能够正确计算n! 的程序是( )。A.Private Sub Command1_Click( ) n=5:x=l Do x=x*i i=i+1 Loop While i < n Print x End SubB.Private Sub Command1_Click( ) n=5:x=1:i=1 Do x=x*i i=i+1 Loop While i < n Print x End SubC.Private Sub Command1_Cliek( ) n:5:x=1:i=1 Do x=x* i i:i+1 Loop While i < = n Print x End SubD.Private Sub Command1_Cliek( ) n=5:x:1:i=1 Do x=x*i i=j+1 Loop While i > n Print x End Sub
以下能够正确计算n!的程序是A.Privas Sub Command1_Click() n=5:x=1 Do x=x*i i=i+1 Loop While i<n Print x End SubB.Private Sub Command1_Click() n=5:x=1:i=1 Do x=x*i i=i+1 Loop While i<n Print x End SubC.Private Sub Command1_Click() n=5:x=1:i=1 Do x=x*i i=i+1 Loop while i<=n Print x End SubD.Private Sub Command1_Click() n=5:x=1:i=1 Do x=x*i i=i+1 Loop While i>n Print x End Sub
以下能够正确计算1+2+3+…+10的程序是A.Private Sub Command1_Click() Sum=0 ForI=1 To 10 Sum=Sum+I Next I Print Sum End SubB.Private Sub Command1_Click() Sum=0,I=1 Do While I<=10 Sum=Sum+I I=I+1 Print Sum End SubC.Private Sub Command1_Click() Sum=0: I=1 Do Sum=Sum+I I=I+1 Loop While I<10 Print Sum End SubD.Private Sub Command1_Click() Sum=0: I=1 Do Sum=Sum+I I=I+1 Loop Until I<10 Print Sum End Sub
编写如下事件过程: Private sub sub1 (ByVal x1 As String, y1 As String) Dim xt As String Dim i As Integer i = Len(x1) Do While i>= 1 xt = xt + Mid(x1, i, 1) i=i-1 Loop y1 = xt End Sub Private Sub Form. Click() Dim s1 As String, s2 As String s1= "teacher" sub1 s1, s2 Print s2 End Sub 程序运行后,单击窗体,则窗体上显示的内容是A.rehcaetB.tahreeeC.themeeD.eerthea
以下能够正确计算n!的程序是A.Private Sub Command1_Click( ) n=5: x=1 Do x=x*i i=i+1 Loop While i<n Print x End SubB.Private Sub Command1_Click( ) n=5: x=1: i=1 Do x=x*i i=i+1 Loop While i<n Print x End SubC.Private Sub Command1_Click( ) n=5:x=1:i=1 Do x=x*i i=i+1 Loop While i<= n Print x End SubD.Private Sub Command1_Click( ) n=5:x=1:i=1 Do x=x*i i=i+1 Loop While i>n Print x End Sub
在窗体上画一个命令按钮,名称为Command1。然后编写如下程序: Private Sub Command1_Click() Dim a As Integer,b As Integer,c As Integer If a=0 Then x=x-1 Else If b<>0 Then End If End If If c<>0 Then x=3 Else x=4 End If Print x End Sub 程序运行后,单击命令按钮,其输出结果为 ______。A.34B.4C.35D.3
以下能够正确计算n!的程序是______。A.Private Sub Commeadl_Click() n=5: x=1 Do x=x*i i=i+1 Loop While i<n Print x End SubB.Private Sub Command1_Click() n=5: x=1: i=1 Do x=x*i i=i+1 Loop While i<n Print x End SubC.Private Sub Command1_Click() n=5: x=1: i=1 Do x=x*i i=i+1 Loop Whilei<=n Print x End SubD.Private Sub Commsndl_Click() n=5: x=1: i=1 Do x=x*i i=i+1 Loop While i>n Print x End Sub
下列程序的执行结果为 Private Sub Command1_Click() Dim FirStr As String FtrSt="abcdef" Print Pat(FirStr) End Sub Private Function Pat(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,1)+Mid(xStr,strLen -i+1,1) i=i+1 Loop Pat=tempStr End FunctionA.abcdefB.afbecdC.fedcbaD.defabc
以下能够正确计算1+2+3+…+10的程序是A.Private sub Command1_Click( ) sum=0 For 1=1 To 10 Sum=sum+1, Next I Print Sum End SubB.Private sub Command1_Click( ) Sum=0,I=1 Do While l<=10 Sum=Sum+1 I=I+1 Print Sum End SubC.Private Sub command1_click( ) Sum=0:I=1 Do Sum=Sum+1 I=I+1 Loop While I<10 Print Sum End SubD.Private Sub command1_Click( ) Sum=0:I=1 Do Sum=Sum+1 l=I+1 Loop Until I<10 Print Sum End Sub
编写如下程序: Private Sub Command1_Click() x="abcd" y="1234" For i=1 To 4 z=z+Mid(x,i,1)+Left(y,1) Next i Print z End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.abcd1234B.a1b2c3d4C.a1b1c1d1D.1234abcd
有如下程序: 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() Dim s1 As String,s2 As String S1;="abcdef" Call Invert(s1,s2) Print s2 End Sub Private Sub Invert (ByVal xstr As String,ystr As String) Dim tempstr As String i=Len(xstr) Do While i=1 tempstr=tempstr+Mid(xstr,i,1) i=i-1 Loop ystr=tempstr End SubA.fedcbaB.abcdefC.afbecdD.defabc
在窗体上画一个命令按钮,名称为Command1。然后编写如下程序: Private Sub Command1_Click() Dim a As Integer,b As Integer,c As Integer If a=0 Then x=x-1 Else If b<>0 Then End If End If If c<>0 Then x=3 Else x=4 End If Print x End Sub程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。A.34B.4C.35D.3
执行下面的程序段,x的值为 Private Sub Command1_Click( ) For i=1 To 5 a=a+i Next i x=Val(i) MsgBox x End SubA.5B.6C.7D.8