如下VB程序段
Function s(n As Integer) As Integer
If n=1Then
s=1
Else
s=s(n-1)+n
End If
End Function
Private Sub Form_Click( )
Dim x As Integer
x=s(4)
Print x
End Sub
程序运行时,单击窗体后,变量x的值为( )
【考点】函数.
【答案】C
【解答】
【点评】
声明:本试题解析著作权属菁优网所有,未经书面同意,不得复制发布。
发布:2024/4/20 14:35:0组卷:15引用:4难度:0.7