更多"下列程序输出的结果为 【13】 。 Private Sub Comm"的相关试题:
[填空题]下列程序的输出结果是 【16】
Private Sub Command1_Click( )
Dim a(1 To 20)
Dim i
For i=l To 20
a(i)=i
Next i
For Each i In a( )
a (i) =20
Next i
[填空题]下列程序输出的结果为 【13】 。
Private Sub Command1_Click
Dim a AS Boolean
a=True
If a Then GoTo 11 Else GoTo 22
11:
Print"VB"
22:
Print"VC"
End Sub
[填空题]下列程序输出的结果为 【13】 。
Private Sub Command1 Click
Dim a As Boolean
a=True
If a Then GoTo 11 Else GoTo 22
11:
Print"VC"
22:
Print"VC"
End Sub
[单项选择]下面程序的输出结果是( )。
Private Sub Command1_Click( )
ch$="ABCDEF"
proc ch
Print ch
End Sub
Private Sub proc(ch As String)
s=""
For k=Len(ch)To 1 Step-1
s=s & Mid(ch,k,1)
Next k
ch=s
End Sub
A. ABCDEF
B. FEDCBA
C. A
D. F
[单项选择]以下程序的输出结果是
Private Sub Command1_Click( )
ch$="ABCDEF"
proc ch
Print ch
End Sub
Private Sub proc(ch As String)
s=""
For k=Len(ch)To 1 Step-1
s=s & Mid(ch,k,1)
Next k
ch=s
End Sub
A. ABCDEF
B. FEDCBA
C. A
D. F
[填空题]下列程序的输出结果为______。
Private Sub Command1_Click( )
Dim a(5)
For i=LBound(a)To UBound(a)
a(i)=i*i+2*i+1
Next i
Print a(LBound(a))
End Sub
[填空题]下面程序的输出结果是______。
Private Sub Command1_Click( )
Dim a(1 To 20)
Dim i
For i=1 To 20
a(i)=i
Next i
For Each i In a( )
a(i)=20
Next i
MsgBox a(2)
End Sub
[填空题]下列程序的输出结果是______。
Private Sub Command1_Click( )
Dim arr(1 To 10)
For i=l TO 10
arr(i)=i
Next i
For Each i In arr( )
art(i)=arr(i)*2+1
Next i
MsgBox arr(7)
End Sub
[单项选择]单击按钮时,以下程序运行后的输出结果是
Private Sub Command1_Click( )
Dim x As Integer,y As Integer,z As Integer
x=1:y=2:z=3
Call God(x,x,z)
Print x;x;z
Call God(x,y,y)
Print x;y;y
End Sub
Private Sub God(x As Integer,y As Integer,z As Integer)
X=3*z+1
Y=2*Z
z=x+y
End Sub
A. 6 6 12
B. 8 5 10
C. 9 6 12
D. 8 10 10
[填空题]执行如下程序段后,输出结果为 (7) 。
Private Sub Command1_Click( )
sum=0
For i=1 To 18 Step 2
For j=2 T0 6
If (Mod j)<>0 Then sum=sum+j
Next
Next
Print sum.
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 Function
A. abcdef
B. aPDecd
C. fedcba
D. defabc
[单项选择]下列程序的执行结果为
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 Sub
A. fedcba
B. abcdef
C. afbecd
D. defabc
[单项选择]下列程序的执行结果为 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 Sub
A. fedcba
B. abcdef
C. afbecd
D. defabc