首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程: Private Sub Command1_Click( ) Dim i As Integer,x As Integer For
在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程: Private Sub Command1_Click( ) Dim i As Integer,x As Integer For
admin
2009-02-13
39
问题
在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程: Private Sub Command1_Click( ) Dim i As Integer,x As Integer For i=l To 6 If i=1 Then x=i lf i<=4 Then x=x+1 Else x=x+2 End lf Next i Print x End Sub 程序运行后,单击命令按钮,其输出结果为
选项
A、9
B、6
C、12
D、15
答案
1
解析
当i<=4循环完成后,x=5;当i等于5和6时,都是执行循环体内的 x=x+2,所以最后结果是x=9。
转载请注明原文地址:https://kaotiyun.com/show/2K2p777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
编译运行以下程序后,关于输出结果的说明正确的是()。 publicclassConditional{ publicstaticvoidmain(Stringargs[]){ intx=2: System.out.printl
Socket的工作流程是()。 ①打开连接到Socket的输入/输出 ②按某个协议对Socket进行读/写操作 ③创建Socket ④关闭Socket
下列哪个是非法的Java标识符()。
Java语言的各种数据类型之间提供自动转换,如第1操作数是byte类型,第2操作数是float类型,其结果是______类型。
下列关系运算中,能使经运算后得到的新关系中属性个数多于原来关系中属性个数的是
在结构化设计方法中生成的结构图(SC)中,带有箭头的连线表示
表达式1/2+“aa”+3的值为
Java程序的执行过程中用到一套JDK工具,其中javaprof.exe是指()。
下面程序的目的是在屏幕上显示当前目录下的文件信息。文件信息通过表格JTable的实例显示。请改正程序中的错误(有下划线的语句),使程序能输出正确的结果。注意:不改动程序的结构,不得增行或删行。importjava.awt.*;im
下列数据结构中属于非线性结构的是()。
随机试题
下面说法正确的是A.上颌前磨牙舌侧髓角较高,备洞易穿髓B.下颌前磨牙髓室底较深C.上颁磨牙近颊、舌髓角较高,备洞易穿髓D.下颌第一磨牙易出现C形根管E.乳牙牙髓髓角较低
暗视野显微镜常采用的照明为
A.AML-M7B.G6PD缺陷症C.慢性粒细胞白血病D.真性红细胞增多症E.AML-M4酯酶双重染色阳性的是
在用贯入阻力法测定混凝土凝结时间的试验中,测定之前不需要将混凝土拌和物做过筛处理。()
工程投标和施工阶段,施工单位编制的施工组织设计应当包括()。
岩石分级是根据()的大小.
属国内船舶保险承保的船舶是()
零存整取的利率低于整存整取定期存款的利率,高于活期存款的利率。()
就给定资料反映的问题,用不超过150字进行概括。要求:全面,有条理,有层次。从政府制定政策的角度,就材料反映的问题提出对策建议。要求:有针对性,切实可行。字数不超过350字。
[2015年第44题]研究人员将角膜感觉神经断裂的兔子分为两组:实验组和对照组。他们给实验组兔子注射一种从土壤霉菌中提取的化合物。3周后检查发现,实验组兔子的角膜感觉神经已经复合;而对照组兔子未注射这种化合物,其角膜感觉神经都没有复合。研究人员由此得出结论
最新回复
(
0
)