重要提示:请勿将账号共享给其他人使用,违者账号将被封禁!
查看《购买须知》>>>
首页 > 计算机等级考试
网友您好,请在下方输入框内输入要搜索的题目:
搜题
拍照、语音搜题,请扫码下载APP
扫一扫 下载APP
题目内容 (请给出正确答案)
[主观题]

有如下SUB过程: Sub s(x As Single,y As Single) t=x x=t / y y=t Mod y End 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=x x=t / y y=t Mod y End Sub 在窗体上添加一”相关的问题

第1题

假定在窗体中的通用声明段已经定义有如下的子过程:Subf(x As Single,y As Single)t=xx=yy=xEnd S

假定在窗体中的通用声明段已经定义有如下的子过程: Subf(x As Single,y As Single) t=x x=y y=x End Sub 在窗体上添加一个命令按钮(名为Commandl),然后编写如下事件过程: Pfivme Sub Commandl_Click() a=10 b=20 f(a,B) MsgBox a&b End Sub 打开窗体运行后,单击命令按钮,消息框输出的值分别为()

A.20和10

B.10和20

C.10和10

D.20和20

点击查看答案

第2题

假定有如下的Sub过程:Sub S(x As Single,y As Single) t=x x=t/y y=t Mod yEnd Sub在窗体上画一

假定有如下的Sub过程: Sub S(x As Single,y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a As Single Dim b As Single a=5 b=4 S a,b Print a,b End Sub 程序运行后,单击命令按钮,输出结果为 ______ 。

A.5 4

B.1 1

C.1.25 4

D.1.25 1

点击查看答案

第3题

有如下函数过程:Function lj(x As Integer)As LongDims As LongDimi As Integers=0Fori=1 To xs=

有如下函数过程: Function lj(x As Integer)As Long Dims As Long Dimi As Integer s=0 Fori=1 To x s=s+i Nexti lj=s End Funcfion 在窗体上添加一个命令按钮,名为Commandl,编写事件过程调用该函数,输出结果为 ()。 Private Sub Commandl_lick()

A.25

B.35

C.45

D.55

点击查看答案

第4题

假定有如下的Sub过程:Sub S(x As Single,y As Single)t=xx=t/yy=t Mod y End Sub在窗体上画一个

假定有如下的Sub过程: Sub S(x As Single,y As Single) t=x x=t/y y=t Mod y End Sub在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a As Single Dim b As Single a=5 b=4 S a,b Print a,b End Sub程序运行后,单击命令按钮,输出结果为______ 。

A.5 4

B.1 1

C.1.25 4

D.1.25 1

点击查看答案

第5题

设有一个命令按钮Command1的事件过程以及一个函数过程,程序如下:Private Sub Command1_Click() S

设有一个命令按钮Command1的事件过程以及一个函数过程,程序如下:

Private Sub Command1_Click()

Static x as integer

X=f(x+5)

Cls

Print x

End Sub

Private function f(x as integer)as integer

F=x+x

End function

连续单击命令按钮3次,第3次单击命令按钮后,窗体上显示的计算结果是

A)10

B)30

C)60

D)70

点击查看答案

第6题

现有如下一段程序:Option Base 1Privalc Sub Command1 Click() Dim a a=Array(3,5,7,9‘) x=1 F

现有如下一段程序:

Option Base 1

Privalc Sub Command1 Click()

Dim a

a=Array(3,5,7,9‘)

x=1

For i=4,10 j Step-1

s=s+a(i)*X

x=x*10

Next i

Print s

End Sub

执行程序,单击Command1命令按钮键,执行上述事件过程,输出结果是()。

A.9753

B.3579

C.35

D.79

点击查看答案

第7题

有如下程序: Private Sub Command1 Click() Dim a As Single Dim b As Single a=5:b=4

有如下程序: Private Sub Command1 Click() Dim a As Single Dim b As Single a=5:b=4 Call S(a,B)End Sub Sub S(x As Single,y As Single) t=x x=t\y y=t Mod y End Sub 在调用运行上述程序后,a和b的值分别为

A.0 0

B.1 1

C.2 2

D.1 2

点击查看答案

第8题

在窗体上画一个名称为Command1的命令按钮,一个名称为Label1的标签,然后编写如下事件过程:Private

在窗体上画一个名称为Command1的命令按钮,一个名称为Label1的标签,然后编写如下事件过程: Private Sub Command1_Click() S=0 For i=1 To 15 x=2*i-1 1fx Mod 3=0 Then s=s+1 Next i Label1.Caption=s End Sub 程序运行后,单击命令按钮,则标签中显示的内容是

A.1

B.5

C.27

D.45

点击查看答案

第9题

在窗体上画一个名称为Command1的命令按钮, 一个名称为Label1的标签, 然后编写如下的事件过程:

Private Sub Command1_Click()

s = 0

For i = 0 To 15

X = 2 * i - 1

If X Mod 3 = 0 Then s = s + 1

Next i

Label

1.Caption = s

End Sub

程序运行后, 单击命令按钮, 则标签中显示的内容为

A.1

B.5

C.27

D.45

点击查看答案

第10题

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:Private Sub Command1_Click() S

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Static y As Integer Cls For i=0 To 2 x=x+y y=y+3 Next Print x, y End Sub 程序运行后,连续二次单击Command1按钮后,窗体上显示的是 ______。

A.9 9

B.36 18

C.30 12

D.63 27

点击查看答案
下载APP
关注公众号
TOP
重置密码
账号:
旧密码:
新密码:
确认密码:
确认修改
购买搜题卡查看答案 购买前请仔细阅读《购买须知》
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《服务协议》《购买须知》
立即支付 系统将自动为您注册账号
已付款,但不能查看答案,请点这里登录即可>>>
请使用微信扫码支付(元)

订单号:

遇到问题请联系在线客服

请不要关闭本页面,支付完成后请点击【支付完成】按钮
遇到问题请联系在线客服
恭喜您,购买搜题卡成功 系统为您生成的账号密码如下:
重要提示:请勿将账号共享给其他人使用,违者账号将被封禁。
发送账号到微信 保存账号查看答案
怕账号密码记不住?建议关注微信公众号绑定微信,开通微信扫码登录功能
请用微信扫码测试
优题宝