有如下SUB过程:Sub s(x As Single,y As Single)t =xx=t / yY=t Mod yEnd Sub在窗体上添加一个命令按纽,然后编写如下事件过程:Private Sub Form_ Click()Dim a As SingleDim b As Singlea=5b=4s a,bPrint a,bEnd Sub则程序运行后,单击命令按纽,输出的结果为:【 】。
有如下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
则程序运行后,单击命令按纽,输出的结果为:【 】。
相关考题:
有如下SUB过程:Sub s(x As Single,y As Single)t=xx=t / yy=t Mod yEnd Sub在窗体上添加一个命令按钮,然后编写如下事件过程:Private Sub Form_Click()Dim a As SingleDim b As Singlea=5b=4s a,bPrint a,bEnd Sub则程序运行后,单击命令按钮,输出的结果为【 】 。
假定有如下的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(10A.1和1B. 1.25和1C. 1.25和4D. 5和4
变量x,y都是single类型,它们的值分别为10.7和20.3,变量t是整型,执行下面语句后,x,y的值变为()。t=x:x=y:y=tA.10.7,20.3B.20.3,10.7C.20.3,11D.20,10.7
有如下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 SubA.1.25 1B.5 4C.4 5D.1 1.25
运行下列程序:Private Sub form_Click( )x = 8: y = 2Call fun1((x), y)Print x, yEnd SubPrivate Sub fun1(x, y)s = xx = s / yy = s Mod yEnd Sub单击窗体后,则在窗体上显示的结果是( )。A.4 2B.8 2C.8 0D.2 4
下列程序的输出结果是:___________。 x = 10 y = 20 def swap(x, y): t = x x = y y = t print(x, y) swap(x,y) print(x,y)A.20 10 10 20B.10 20 10 20C.10 20 20 10D.20 10 20 10
下列程序的输出结果是: x = 1 y = 2 def swap(x, y): t = x x = y y = t print x, y swap(x, y) print x, yA.1 2 1 2B.2 1 1 2C.1 2 2 1D.2 1 2 1
假设现在有两个变量分别是x和y,其中x=3,y=5,以下选项中____________不能交换两个变量中的值。A.x=y y=xB.x,y=y,xC.t=x x=y y=tD.x=x+y y=x-y x=x-y