赞题库-背景图
单项选择题

单击命令按钮之后,下列程序代码的执行结果为______。
Private Function P(N As Integer)
Static sum
For I=I To N
Sum = sum +1
Next I
P =sum
End Function
Private Sub Command1_Click()
S=P(1)+P(2)+P(3)+P(4)
Print S:
End Sub

A.20
B.30
C.115
D.135
<上一题 目录 下一题>
热门试题

单项选择题对窗体编写如下代码: Option Base 1 Private Sub Form_ KeyPress (KeyAscii As Integer) a=Array(237,126,87,48,498) m1=a(1) m2=1 If KeyAscii=13 Then For i=2 To 5 If a(i)>m1 Then m1=a(I) m2=i End If Next i End If Print m1 Print m2 End Sub 程序运行后,按回车键,输出结果为______ 。

A.48
4
B.237
1
C.498
5
D.498
4

单项选择题假定有如下的Sub过程: Sub S(x As Single,y As Single) t=x x=t y y=t Mod y End Sub在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a As Single Dim b As Single a=5 b=4 S a,b Print a,b End Sub程序运行后,单击命令按钮,输出结果为______ 。

A.5 4
B.1 1
C.1.25 4
D.1.25 1