首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
在窗体上画1个名称为Command1的命令按钮,1个名称为Label1的标签,然后编写如下事件过程: Private Sub Command1_Click() Dim n As Integer, t As Integer n = 1: t =
在窗体上画1个名称为Command1的命令按钮,1个名称为Label1的标签,然后编写如下事件过程: Private Sub Command1_Click() Dim n As Integer, t As Integer n = 1: t =
admin
2020-07-22
16
问题
在窗体上画1个名称为Command1的命令按钮,1个名称为Label1的标签,然后编写如下事件过程:
Private Sub Command1_Click()
Dim n As Integer, t As Integer
n = 1: t = 1
Do
n = n + 1
t = t * n
Loop Until n > 4
Label1.Caption = t
End Sub
程序运行后,单击命令按钮Command1,则标签中显示的内容是
选项
A、1
B、2
C、24
D、120
答案
D
解析
当n=1时,执行循环内程序,n=1+1=2,t=1*2=2;当n=2,继续执行循环内程序,n=2+1=3,t=2*3=6;当n=3时,执行循环内程序,n=3+1=4,t=6*4=24;当n=4时,执行循环内程序,n=4+1=5,t=24*5=120,退出循环。故选择D项。
转载请注明原文地址:https://kaotiyun.com/show/XfHp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
在窗体上画1个文本框,名称为Text1,然后编写如下程序:PrivateSubFormLoad()Open"C:\dat.txt"ForOutputAs#1Text1.Text=""EndSub
如果在VisualBasic集成环境中没有打开属性窗口,下列可以打开属性窗口的操作是( )。
已知图片框Picture1中已装入一个图形,为了在不删除图片框的前提下,清除该图形,应采取的正确操作是( )。
命令按钮Command1的MouseUp事件过程结构如下:PrivateSubCommand1_MouseUp(ButtonAsInteger,ShiftAsInteger,
下面关于算法的叙述中,正确的是()。
下面不属于软件需求分析阶段主要工作的是
A、选择B、投影C、自然连接D、并A由关系R到关系S为一元运算,排除C和D。关系S是关系R的一部分,是通过选择之后的结果,因此选A。
软件测试的目的是( )。
将E-R图转换到关系模式时,实体与联系都可以表示成()。
设树T的深度为4,其中度为1,2,3,4的结点个数分别为4,2,1,1。则T中的叶子结点数为
随机试题
某企业拟筹资金实施一项技术改造项目,内容为新建一套加工装置,该装置建设投资25000万元,计算期6年(建设期1年,运营期5年),新装置所需流动资金5000万元,全部运营期第1年投入。假设该装置投资所含增值税可在其建设期内由原企业抵扣,忽略其带来的影响。新装
排水固结法分为堆载预压法和真空预压法两类,用于加固()。
黄疸消退后调治肝脾不调证的代表方剂是( )
A.骨髓巨核细胞增多伴成熟障碍B.骨髓巨核细胞增多无成熟障碍C.骨髓巨核细胞明显减少D.骨髓原始巨核细胞≥0.30(非红系细胞)E.骨髓可见较多的小巨核细胞原发性血小板增多症()
人身保险合同中由投保人指定的,在保险事故发生后享有保险赔偿与保险金请求权的人是()。
注重以服务对象为中心,创造一种有利于服务对象自我发展的辅导环境的个案工作模式是()。
阅读下面文字,回答有关问题:《普通高中化学课程标准(实验)》中有这样的表述:结合人类探索物质及其变化的历史与化学科学发展的趋势,引导学生进一步学习化学的基本原理和基本方法,形成科学的世界观。问题:结合高中化学某一内容的教学,举例说明如何借助化学史开
A、 B、 C、 D、 D黑点个数每次增加2,圆圈个数每次减少2。
恩格斯说:“……他用这本书来向自然事务方面的教会权威挑战。从此自然科学便开始从神学中解放I叶j来……”。引文中的“他”和“这本书”指的是()。
简述人本主义心理学的基本观点。
最新回复
(
0
)