现有如下Sub过程: Sub fun(x es single,y as single) t = x x = t/y y = t mod y End sub在窗体上添加命令按钮(cmD) ,编写如下事件过

admin2009-01-19  30

问题 现有如下Sub过程:    Sub fun(x es single,y as single)        t = x        x = t/y        y = t mod y    End sub在窗体上添加命令按钮(cmD) ,编写如下事件过程:     Private sub cmd_click( )        Dim a as single        Dim b as single        a = 5        b = 4        fun a, b        Msgbox a & chr(10) + chr(13) & b    End sub运行程序后,单击按钮,则在消息框中显示的内容为(    )

选项 A、1和1
B、1.25和1
C、1.25和4
D、5和4

答案2

解析 调用过程fun后,a和b传给参数x、y,运算后a、b分别是1.25、1。
转载请注明原文地址:https://jikaoti.com/ti/6Ic0FFFM
0

最新回复(0)