有如下函数过程:Function secproc(x As Integer, y As Integer, z As Integer) secproc = 3 y + z + 2 xEnd Function Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer a = 2: b = 3: c = 4 Print secproc(c, b, a)End Sub该程序的运行结果是()。
有如下函数过程:Function secproc(x As Integer, y As Integer, z As Integer) secproc = 3 y + z + 2 xEnd Function Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer a = 2: b = 3: c = 4 Print secproc(c, b, a)End Sub该程序的运行结果是()。
A.17
B.18
C.19
D.20
正确答案:19
Tag:VisualBasic程序设计 函数 过程
时间:2021-11-29 15:20:43
- 上一篇:假定有以下函数过程:Function Fun(s As String) As String Dim s1 As String For i = 1 To Len(s) s1 = UCase(Mid(s, i, 1)) + s1 Next i Fun = s1End Function在窗体上添加一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click() Dim Str1 As String Dim Str2 As String Str1 = InputBox(“请输入一个字符
- 下一篇:有如下函数过程:Function Cys(ByVal x As Integer, ByVal y As Integer) As Integer Dim quotients Do While y <> 0 quotients = x / y x = y y = quotients Loop Cys = xEnd Function以下是调用该函数的事件过程,该程序的运行结果是()。Private Sub Command1_Click() Dim a As Integer Dim b As Inte