赞题库-背景图
填空题

执行下列程序,单击Command1按钮后,窗体上显示的第一行是______,第二行是______,最后一行是______。
Option Explicit
Private Sub Command1_Click()
Dim I As Integer, n As Integer
For I=1 To 20 Step 2
n=fun(I, I)
Print n
Next
Print I
End Sub
Private Function fun(ByVal a As Integer, b As Integer)As Integer
a=a+b
b=b+a
fun=a+b
End Function

【参考答案】

5 25 53
<上一题 目录 下一题>
热门试题

填空题执行下列程序,在文本框Text1中输入数据13579后,单击Command1按钮,窗体上显示的第一行是______,第二行是______,最后一行是______。Option ExplicitPrivate Sub Command1_Click()Dim x As Integerx=Text1.TextPrint p(x)End SubPrivate Function p(x As Integer) As IntegerIf x<100 Thenp=x Mod 100Elsep=p(x 100)*10+x Mod 10Print pEnd IfEnd Function

填空题执行下列程序,单击按钮Command1,在窗体上显示的第一行是______,第二行是______,最后一行是______。Option Base 1Option ExplicitPrivate Sub Command1_Click()Dim i As Integer, st As String, n As Integer, p As String*1p= A For i=3 To 1 Step-1n=Asc(P)-iIf n<65 Then n=n+26st=Chr(n)st=st&Fun(i)Print stNextEnd SubPrivate Function Fun(n As Integer) As StringDim i As Integer, s As IntegerFor i=1 To ns=s+iNexts=s+nFun=sEnd Function