首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
编写如下程序: Private Sub Command1_Click() Dim score As Integer score = 86 If score > 85 Then r = 1 ElseIf score >
编写如下程序: Private Sub Command1_Click() Dim score As Integer score = 86 If score > 85 Then r = 1 ElseIf score >
admin
2020-07-22
25
问题
编写如下程序:
Private Sub Command1_Click()
Dim score As Integer
score = 86
If score > 85 Then
r = 1
ElseIf score > 60 Then
r = 2
Else
r = 0
End If
Print r
End Sub
程序运行后,单击命令按钮Command1,输出结果为
选项
A、0
B、1
C、2
D、86
答案
B
解析
考察If…Else If…Else…End If语句。条件判断成立则执行对应分支的语句。86>85,所以r=1。选B)。
转载请注明原文地址:https://jikaoti.com/ti/DhS0FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
下面程序运行时,若输入“VisualBasicProgramming”,则在窗体上输出的是()。PrivateSubCommand1Click()DimNum(25)AsInteger,Chr1.AsStringChr1
窗体上有1个名称为Command1的命令按钮,事件过程如下:PrivateSubCommand1_Click() DimnumAsInteger,xAsInteger num=Val(InputBox("请输入一个正整数"))
假定有如下程序:PrivateSubForm_Click()Dima(4)AsInteger,b(4)AsIntegerFork=0To2a(k+1)=Val(InputBox("请
窗体上有一个名称为Label1的标签;一个名称为Timer1的计时器,其Enabled和Interval属性分别为True和1000。编写如下程序:DimnAsIntegerPrivateSubTimer1_Timer() ch=Chr(
命令按钮Command1的MouseUp事件过程结构如下:PrivateSubCommand1_MouseUp(ButtonAsInteger,ShiftAsInteger,
下面不是键盘事件的是()。
执行下列语句:strInput=InputBox("请输入字符串","字符串对话框","字符串")将显示输入对话框。此时如果直接单击"确定"按钮,则变量strInput的内容是( )。
关于随机文件,以下叙述中错误的是( )。
如果要在语句:a=Array(1,2,3,4,5)的前面声明变量a,则正确的声明是
一棵二叉树中共有70个叶子结点与80个度为1的结点,则该二叉树中的总结点数为
随机试题
In1786acallwentouttoallthestatesinvitingthemtosenddelegatestoameetingtobeheldinPhiladelphiainthespring
在建工程的建筑物、构筑物或者其他设施倒塌造成他人损害的,由建设单位与施工企业承担连带责任。该责任在债的产生根据中属于()之债。
营业厅经营、储存和展示商品的火灾危险性不得为()。
某企业为增值税一般纳税人,适用增值税税率为13%,2020年7月开始自行建造管理用房一幢,购入所需各种物资100000元,支付增值税税额13000元,全部用于建造厂房。另支付工程人员工资20000元,提取工程人员的福利费2800元,支付其他费用3755元。
关于硬盘的叙述中,下列选项错误的是()。
(2010年918联考一35)10,24,52,78,(),164
甲、乙二人签订借款合同约定:甲向乙借款10万元,借期一年。一年期满之后连续三年乙均未请求甲还款,三年之后,乙请求甲还款,甲于是主张诉讼时效经过,拒绝还款。关于本案,下列说法正确的是()。
结合材料,回答问题:材料1毛泽东指出:“中日战争不是任何别的战争,乃是半殖民地半封建的中国和帝国主义的日本之间在二十世纪三十年代进行的一个决死的战争。”日本是一个强大的帝国主义国家,但它的侵略战争是退步的、野蛮的;中国的国力虽然比较弱,但它的反
A、OnthesideofEngland.B、OnthesideofFrance.C、OnthesideoftheUnitedStates.D、Onthesideofthemselves.BOnwhichsi
Apaper,Anatomy(剖析)ofaLargeScaleSocialSearchEngine,layingoutastrategyforsocialsearchhasbeengettingagooddeal
最新回复
(
0
)