首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下的程序段,该程序段执行完后,共执行的循环次数是 total=0 Counter=1 Do Print Counter total=total * Counter + 1 Print total Counter=Counter +1 I
有如下的程序段,该程序段执行完后,共执行的循环次数是 total=0 Counter=1 Do Print Counter total=total * Counter + 1 Print total Counter=Counter +1 I
admin
2009-01-15
40
问题
有如下的程序段,该程序段执行完后,共执行的循环次数是 total=0 Counter=1 Do Print Counter total=total * Counter + 1 Print total Counter=Counter +1 If total > 10 Then Exit Do End If Loop While Counter<=10
选项
A、4
B、10
C、15
D、20
答案
1
解析
Do…Loop While语句
本题中Counter为计数器,当Counter=4时,total=41>10,跳出循环,共执行4次循环。注意:Do…Loop While结构和条件语句或多分支结构的嵌套结构。
转载请注明原文地址:https://jikaoti.com/ti/3080FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
下面是一个Applet程序,其功能是实现一个计数器,每隔0.15秒计数器数值加1,数值动态变化,并且能够控制计数器的暂停和继续。要求通过使用swing的构件建立图形用户界面,主要包括一个文本区域,用于显示计数器结果;两个按钮,一个使计数器暂停,一个使计数器
下列哪个选项不能提高程序的性能?
【】是一种信息隐蔽技术,目的在于将对象的使用者和对象的设计者分开。
在线程的基本控制中,哪个方法使比其低的优先级线程先运行?
下列说法中,错误的是()。
下面是一个Applet程序,其功能是用一组坐标点绘制一个多边形,并通过沿坐标的垂直方向移动,把它移到窗口的下半部分,然后填充它。请改正程序中的错误(有下划线的语句),使程序能输出正确的结果。注意:不改动程序的结构,不得增行或删行。源程序文件
下列有关数据库的描述,正确的是()。
下列对于软件测试的描述中正确的是
结构化程序设计的主要特点是
在深度为5的满二叉树中,叶子结点的个数为()
随机试题
长期借款利息核算时,涉及的账户包括()
动液面是抽油机井(),测得的油套环形空间液面至井口的距离。
A.阴虚火旺B.心脾两虚C.两者均可D.两者均不可
患者,男,60岁。吸烟30年,反复咳嗽咳痰10年,加重伴呼吸困难2小时入院,患者所患疾病特点不包括
关于免疫反应,下列哪项是错误的()
盐酸氯丙嗪的鉴别反应是
当年形成的会计档案,在会计年度终了后,可暂由本单位会计机构保管()年。
根据证券投资咨询业务行为的有关规定,对于证券分析师面向公众开展的证券投资咨询业务的信息引用,要求( )。
绘画以内容、题材来分类,有()
下面句子中没有语病的是()。
最新回复
(
0
)