题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-28 03:49:47

[填空题]窗体上命令按钮Command1的事件过程如下:
Private Sub Command1_Click( )
Dim total As Integer
total=s(1)+s(2)
Print total
End Sub
Private Function s(m As Integer) As Integer
Static x As Integer
For i=1 To m
x=x+1
Next i
s=x
End Function
运行程序,第三次单击命令按钮Command1时,输出结果为______。

更多"窗体上命令按钮Command1的事件过程如下: Private Su"的相关试题:

[单项选择]单击窗体上Command1命令按钮时,执行如下事件过程: Private Sub Command1_Click( ) a$= "software and hardware" b$= Right(a$, 8) c$= Mtd(b$ 1, 8) Msgbox c$ End sub则在弹出的信息框的标题栏中显示的信息是( )。
A. software and hardware
B. software
C. hardware
D. and
[填空题]单击窗体上的命令按钮Command1, 【10】
Private Sub Command1_Click( )
a= "10"
b=20
c=Val(a) +b
Print c
End Sub
[填空题]在窗体上添加一个命令按钮Command1,然后编写如下事件过程。
Private Sub Command1_Click( )
Dim b,k
For k=1 To 6
b=23+k
Next k
MsgBox k+b
End Sub
打开窗体后,单击命令按钮,消息框数据的结果是______。
[单项选择]在窗体上有一个命令按钮Command1,通用过程fun和命令按钮的事件过程如下:
Private Function fun(ByVal m As Integer)
If m Mod 2=0 Then
fun=2
Else
fun=1
End If
End Function
Private Sub Command1_Click( )
Dim i As Integer,s As Integer
s=0
For i=1 To 5
s=s+fun(i)
Next
Print s
End Sub
程序运行后,单击命令按钮,则窗体上输出( )。
A. 6
B. 7
C. 8
D. 9
[单项选择]在窗体上有一个命令按钮,然后编写如下事件过程  Private Sub Command1 _ cickc ( )    a=InputBox("enter the first integer")    b=InputBox("enter the second integer")    Print b + a  End Sub  程序运行后,单击命令按钮,先后在两个输入框中分别输入“2”和“6”,则输出结果为

A. 2
B. 62
C. 8
D. 26
[单项选择]在窗体上有一个命令按钮,然后编写如下事件过程:   Private Sub Command1Click( )    Dim a(5)As String    For i=1,To 5    a(i)=Chr(Asc("A")+(i-1))    Next i    For Each b In a    Print b;    Next   End Sub   程序运行后,单击命令按钮,输出结果是( )。
A. ABCDE
B. 1 2 3 4 5
C. abcde
D. 出错信息
[填空题]在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1 Click( ) Do Until b<O a=InputBox("输入a的值") a=Val(A) b=InputBox("输入b的值") b=Val(B) a=a+b Loop Print a End Sub 程序运行后,依次输入5,4,3,2,1,0,-1,-2,则输出结果是 【12】
[填空题]在窗体上画一个命令按钮,然后编写如下事件过程:
Private Sub Command1 Click( )
a= Val(InputBox(“请输入一个整数”))
b=Val(InputBox(“请输入一个整数”))
Print a+b
End Sub
程序运行后,单击命令按钮,在输入对话框中分别输入12和34,输出结果为 ______。
[单项选择]在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click( ) Dim I,Num Randomize Do ForI=1 To 1000 Num=Int(Rnd*100) Print Num; SelectCase Num Case 12 Exit For Case 58 Exit Do Case 65,68,92 End End Select Next I Loop End Sub 上述事件过程执行后,下列描述中正确的是
A. Do循环执行的次数为1000次
B. 在For循环中产生的随机数小于或等于100
C. 当所产生的随机数为12时结束所有循环
D. 当所产生的随机数为65、68或92时窗体关闭、程序结束
[填空题]单击窗体上的命令按钮Command1,______
Private Sub Command1_Click( )
a= "10"
b=20
c=Val(a) +b
Print c
End Sub

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码