现有如下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
第1题:
在程序设计中交换变量x和y的值,应使用的算法描述是()。
A.t←x y←x y←t
B.x←y y←t t←x
C.x←y y←x
D.t←x x←y y←t
第2题:
有如下Sub过程: Sub Sun(x As Single,y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上的命令按钮Command1中,编写如下事件过程,执行该事件过程调用Sun过程,结果为( )。 Private Sub Command1_Click() Dim a As Single Dim b As Single a=5 b=4 Sun a,b Print a;b End Sub
A.1.25 1
B.5 4
C.4 5
D.1 1.25
第3题:
有如下Sub过程: Sub Sun(x As Single, y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上的命令按钮Command1中,编写如下事件过程,执行该事件过程调用Sun过程,结果为( )。 Private Sub Command1_Click() Dim a As Single Dim b As Single a=5 b=4 Sun a, b Print a; b End Sub
A.1.25 1
B.5 4
C.4 5
D.1 1.25
第4题:
变量x,y都是single类型,它们的值分别为10.7和20.3,变量t是整型,执行下面语句后,x,y的值变为()。t=x:x=y:y=t
A.10.7,20.3
B.20.3,10.7
C.20.3,11
D.20,10.7
第5题:
假定有如下的Sub过程: Sub sfun(X As Single,y As Single)t=XX=t/yY=tModYEndSub在窗体上添加一个命令按钮(名为Commandl),然后编写如下事件过程。 Private Sub Commandl Click( ) Dim aAs singleDimbAs singlea=5b=4sfun a,bMsgBOX a&;chr(10)+chr(13)&;bEndSub打开窗体运行后,单击命令按钮,消息框的两行输出内容分别为( )。
A.1和1
B.1.25和1
C.1.25和4
D.5和4
第6题:
假定有如下的Sub过程: Sub sfun(x As Single,y As SinglE)t=x x=t/y y=t Mod y End Sub 在窗体上添加一个命令按钮(名为Command1),然后编写如下事件过程: Private Sub Command1_Click( ) Dim a as single Dim b as single a=5 b=4 sfun a,b MsgBox a &char(10
A.1和1
B. 1.25和1
C. 1.25和4
D. 5和4
第7题:
有如下SUB过程:
Sub s(x As Single,y As Single)
t =x
x=t / y
Y=t Mod y
End Sub
在窗体上添加一个命令按纽,然后编写如下事件过程:
Private Sub Form_ Click()
Dim a As Single
Dim b As Single
a=5
b=4
s a,b
Print a,b
End Sub
则程序运行后,单击命令按纽,输出的结果为:【 】。
第8题:
假定有如下的Sub过程: Sub sfun(x As Single,y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上添加一个命令按钮(名为Command1),然后编写如下事件过程: Private Sub Command1 Click() Dim a as single Dim b as single a=5 b=4 sfun a,b MsgBox a & chr(10)+chr(13)&b End Sub 打开窗体运行后,单击命令按钮,消息框的两行输出内容分别为( )。
A.1n1
B.1.25和1
C.1.25和4
D.5和4
第9题:
有如下SUB过程:
Sub s(x As Single,y As Single)
t=x
x=t / y
y=t Mod y
End Sub
在窗体上添加一个命令按钮,然后编写如下事件过程:
Private Sub Form_Click()
Dim a As Single
Dim b As Single
a=5
b=4
s a,b
Print a,b
End Sub
则程序运行后,单击命令按钮,输出的结果为【 】 。