首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
编写如下程序: Private Sub Command1_Click() Dim x As Integer, y As Integer x = 1 y = 1 Do y = x * y If y > 10 T
编写如下程序: Private Sub Command1_Click() Dim x As Integer, y As Integer x = 1 y = 1 Do y = x * y If y > 10 T
admin
2020-02-27
24
问题
编写如下程序:
Private Sub Command1_Click()
Dim x As Integer, y As Integer
x = 1
y = 1
Do
y = x * y
If y > 10 Then
Exit Do
Else
x = x + 3
End If
Loop Until x <= 10
Print x; y
End Sub
程序运行后,单击命令按钮Command1,输出结果为
选项
A、1 1
B、4 1
C、4 2
D、7 28
答案
B
解析
Do…Loop Until循环当条件为真时循环执行循环体。代入初值进行计算可得结果。选B)。
转载请注明原文地址:https://kaotiyun.com/show/qtTp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
程序流程图中带有箭头的线段表示的是()。
某带链栈的初始状态为top=bottom=NULL,经过一系列正常的入栈与退栈操作后,top=bottom=20。该栈中的元素个数为()。
下面对软件描述错误的是()。
如果将命令按钮的访问键设置为“D”,以下不会触发命令按钮Click事件的操作是()。
下面关于直线控件的叙述中正确的是()。
窗体上有一个名称为CD1的通用对话框,一个名称为Text1的文本框,窗体的单击事件过程如下:PrivateSubForm_Click()CD1.DialogTitle="改变颜色"CD1.Color=Form1.BackColorCD1.Act
下列控件中,不响应Click事件的是()。
在考生文件夹下有一个工程文件sjt5.vbp。在窗体文件中已经给出了全部控件及部分程序。程序运行时,在文本框Text1中输入一个大于2的偶数,并单击“分解为”命令按钮,则可以将该偶数分解为两个素数之和,且要求其中一个素数是所能够分解出的最小的素数(一个偶数
在窗体上画两个文本框,其名称分别为Text1和Text2,然后编写如下程序:PrivateSubForm_Load() Show Text1.Text="" Text2.Text="" Text1.SetFocusEndS
数据库中对概念模式内容进行说明的语言是
随机试题
妊娠头3个月,可以使用的是对正常妇女月经期有影响的是
根据《工程建设项目招标范隔和规模标准规定》,必须进行招标的关系社会公共利益、公众安全的公用事业项目的范围包括()。
依据现行《宪法》规定,下列选项中,在我国依法享有选举权的是()。
1937年,苏联参加集体农庄的农户约占全国农户总数的93%,集体农庄拥有的耕地面积占全国耕地总面积的99.1%。苏联实行的农业集体化旨在()。
在影响个体发展的诸因素中,为个体发展提供生理基础的是()。
2018年全国互联网业务收入9562亿元,比上年增长21.0%。其中,广东、上海、北京互联网业务收入分别增长26.5%、20.0%和25.2%。2018年互联网企业信息服务收入8594亿元,比上年增长20.7%。其中,电子商务平台收入
以下关于二叉排序树的说法正确的是()。I在二叉排序树中,每个结点的关键字都比左孩子关键字大,比右孩子关键字小。Ⅱ每个结点的关键字都比左孩子关键字大,比右孩子关键字小,这样的二叉树都是二叉排序树。Ⅲ在二叉排序
当(23)时,用例是捕获系统需求最好的选择。
以下关于通用对话框的叙述中,错误的是()。
WithinfifteenyearsBritainandothernationsshouldbewellonwiththebuildingofhugeindustrialcomplexesfortherecyclin
最新回复
(
0
)