首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
编写如下事件过程: Private Sub Form_Activate() Dim score(1 To 3)As Integer Dim i As Integer,t As Variant For i=3 To 1
编写如下事件过程: Private Sub Form_Activate() Dim score(1 To 3)As Integer Dim i As Integer,t As Variant For i=3 To 1
admin
2012-09-07
15
问题
编写如下事件过程:
Private 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数组…Ncxt,For Each jn循环在本题中的功能是:依次从数组score中取出每一个元素放到变量t中并输出。数组score中的元素从1到3分别为:2 4 6。
转载请注明原文地址:https://kaotiyun.com/show/uRhp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
与List1.Text属性值相同的是
一个工程中含有窗体Form1、Form2和标准模块Modell,如果在Form1中有语句PublicXAsInteger,在Modell中有语句PublicYAsInteger。则以下叙述中正确的是______。
在VisualBasic中,所有的窗体和控件都必定具有的一个属性是______。
软件测试中路径覆盖测试是整个测试的基础,它是对软件【】进行测试。
在结构化方法中,软件功能分解属于下列软件开发中
表达式3^2Mod36\2^5的值是【】
软件工程的出现是由于【】。
算法的时间复杂度是指
设有下列二叉树:对此二叉树先序遍历的结果是
在程序设计语言中,重复结构对应两类循环语句,对先执行循环体后判断的称为【】循环结构。
随机试题
A.视觉失认B.听觉失认C.触觉失认D.体象障碍E.Gerstmann综合征
患者,女性,27岁。颜面及双下肢水肿,尿少10天,病前10天曾有咽痛。BP160/95mmHg。化验:尿蛋白(++),红细胞(+++),SCr250umol/L,抗“O”阳性,血浆白蛋白32g/L,Hb91g/L。目前最可能的诊断是
合剂若加蔗糖,含糖量一般不高于()
根据《中华人民共和国合同法》,下列关于格式条款合同的说法中,正确的是()。
有关市场风险状况的报告应当定期、及时地向董事会、高级管理层和其他管理人员提供,其内容应主要包括()。
下列情形中,合同已经成立的有()。
我国最长的人工河是()。
取脂定价策略是指生产商利用消费者的求新、求奇心理,抓住竞争对手尚未出现或竞争还不激烈的有利时机,将产品价格定得很高,以便在短期内获取尽可能多的利润、尽快收回投资的一种定价策略。根据上述定义,下列行为属于取脂定价策略的是()。
复合数据类型不包括()。
But,inourenthusiasmtodiscoverourheritage,weareruiningtheveryscenerywegotoenjoy,damagingnaturalhabitats,___
最新回复
(
0
)