首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
编写如下程序: 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
2015-08-28
16
问题
编写如下程序:
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://kaotiyun.com/show/RaQp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
(1)在考生文件夹下有一个工程文件sjt3.vbp,窗体上已经有两个文本框,名称分别为Textl、Text2;一个命令按钮,名称为Cl,标题为“确定”;请画两个单选按钮,名称分别为Opl、Op2,标题分别为“男生”、“女生”;再画两个复选框,名称分别为Ch
(1)考生文件夹下的工程文件sjl3.vbp中有一个菜单、两个标签和两个文本框。程序运行时,用鼠标右键单击窗体会弹出一个弹出式菜单(如图1-213所示)。当选中“计算100以内自然数之和”菜单项时,将计算100以内自然数之和并放入Textl中;当选中“计算
(1)在考生文件夹下有一个工程文件sjt3.vbp。程序运行后,单击“读入数据”按钮,可把考生文件夹下in3.txt文件中的所有英文单词读入,并显示在Textl文本框中;单击“插入列表框”按钮,则按顺序把每个单词作为一项添加到Listl列表框中(如图1-3
(1)在考生文件夹下有一个工程文件sjt3.vbp,请在窗体上画两个框架,其名称分别为F1和F2,标题分别为“交通工具”和“到达目标”。在Fl中画两个单选按钮,名称分别为Opl和Op2,标题分别为“飞机”和“火车”。在F2中画两个单选按钮,名称分别为Op3
数列1,1,3,5,9,15,25,41,…,的规律是从第三个数开始。每个数是它前面两个数的和加1。在考生目录下有一个工程文件sjt5.vbp。窗体中已经给出了所有控件,如图1-99所示。请编写适当的事件过程实现以下功能:在Textl中输入整数40,单击“
下列哪条语句是错的______。
在软件工程中,白箱测试法可用于测试程序的内部结构。此方法将程序看做是______。
软件开发的结构化生命周期方法将软件生命周期划分成______。
在面向对象方法中,()描述的是具有相似属性与操作的一组对象。
树中度为零的结点称为______。
随机试题
平推流的特征是()。
试述大型企业应树立的战略思想。
经脱羧基后可作为精胺、精脒生成原料的氨基酸是
宗族是指()。
SMA面层施工不得使用的机械为()。
任何单位都必须经公安交通管理部门和()的批准,才能按规定占用和挖掘城市道路。
武仲兴
三位股评专家正在对三家上市公司明天的股价走势进行预测。甲说:“公司一的股价会有一些上升,但不能期望过高。”乙说:“公司二的股价可能下跌,除非公司一的股价上升超过5%。”丙说:“如果公司二的股价上升,公司三的股价也会上升。”三位股评专家果然厉害,一天
结构化程序所要求的基本结构不包括()。
Nowthe______portcitynearthemouthofthemightyYangtzeRiverishopingtoleaveitsrecordofturmoilbehindandrenewits
最新回复
(
0
)