首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
编写如下事件过程: Pate Sub Form Activate( ) Dim score(1 To 3)As Integer Dim i As Integer,t As Variant For i=3 To 1 Step-1 score(i)=2
编写如下事件过程: Pate Sub Form Activate( ) Dim score(1 To 3)As Integer Dim i As Integer,t As Variant For i=3 To 1 Step-1 score(i)=2
admin
2020-02-27
16
问题
编写如下事件过程:
Pate Sub Form Activate( )
Dim score(1 To 3)As Integer
Dim i As Integer,t As Variant
For i=3 To 1 Step-1
score(i)=2*i
Next i
For Each t In score
Print t;
Next
End Sub
程序运行后窗体上显示( )。
选项
A、6 4 2
B、2 4 6
C、2
D、6
答案
B
解析
本题考查For Each in循环。For Each in循环格式为:For Each变体变量in数组……,For Each in循环在本题中的功能是:依次从数组score中取出每一个元素放到变量t中并输出。数组score中的元素从1到3分别为:2 4 6。
转载请注明原文地址:https://kaotiyun.com/show/RCTp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
设在窗体模块中有如下类型定义:PublicTypeRecnumAsIntegernameAsStringEndType下面关于这一类型定义的叙述中正确的是()。
在窗体上画一个名称为Text1的文本框,编写如下事件过程代码:PrivateSubText1_KeyPress(KeyAsciiAsInteger)DimchAsStringch=Chr(KeyAscii)IfNot(ch>="0"
设程序中定义了下面的过程:PrivateSubproc(chAsString)PrintchEndSub下面语句中错误的是()。
在软件开发中,需求分析阶段产生的主要文档是()。
以下叙述中,错误的是()。
软件生命周期可分为定义阶段、开发阶段和维护阶段,下面属于定义阶段任务的是()。
VB中,若没有显式声明变量的数据类型,则默认的类型是()。
软件调试的目的是()。
下列说法中正确的是()。
表达式Int(8*Sqr(36)*10^(-2)*10+0.5)/10的值是()。
随机试题
以牙槽骨水平吸收为主的牙周炎是
有关胃十二指肠溃疡急性大出血的护理不正确的是
检定员对某一测量仪器在参考条件下,通过检定在各点均确定了该测量仪器的示值平均值的误差,这些误差是_________。
桥梁动载试验的测振传感器选用,应考虑的因素包括()。
某商场设置了集中控制型消防应急照明和疏散指示系统,灯具采用自带蓄电池电源供电。关于系统组成的说法,正确的是()。
下列不能单独使用的控制键是()。
某投资项目设定折现率为10%,投资均发生在建设期,投资现值为100万元,投产后各年净现金流量现值之和为150万元,则下列各选项正确的有()。
合纵连横
火柴制造业是从1833年发明用木梗涂磷的办法之后出现的。自1845年起,它在英国迅速发展起来,它同时也使牙关锁闭症蔓延到各地。工人中有一半是13岁以下的儿童和不满18岁的少年。谁都知道,这种制造业有害健康,令人生厌,所以只有工人阶级中那些最不幸的人,饿的半
从船上向海中沉放某种探测仪器,按探测要求,需确定仪器的下沉深度y(从海平面算起)与下沉速度v之间的函数关系。设仪器在重力作用下,从海平面由静止开始铅直下沉,在下沉过程中还受到阻力和浮力的作用。设仪器的质量为m,体积为B,海水比重为ρ,仪器所受的阻力与下沉速
最新回复
(
0
)