首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
现有如下程序: Private Sub Commandl_Click() Public Function f(x As Integer) s=0 If x>=10 Th
现有如下程序: Private Sub Commandl_Click() Public Function f(x As Integer) s=0 If x>=10 Th
admin
2017-06-21
22
问题
现有如下程序:
Private Sub Commandl_Click() Public Function f(x As Integer)
s=0 If x>=10 Then
For i=1 To 5 t=x+1
s=s+f(5+i) Else
Next t=x+2
Print s End If
End Sub f=t
End Function
运行程序,则窗体上显示的是
选项
A、38
B、49
C、61
D、70
答案
B
解析
本题考查的考点是有关函数调用和If语句的。要注意在前4次循环中每次调用f函数时传递的参数分别为6、7、8、9,都是小于10的,最后一次循环传递参数10,所以最终结果应该为8+9+10+11+11=49。
转载请注明原文地址:https://kaotiyun.com/show/WTGp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
下列程序执行后,其输出结果为()。Dima(5)Fori=0To4a(i)=i+1m=i+1Ifm=3Thena(m-1)=a(i-2)Elsea(m)=a(i
希尔排序法属于哪一种类型的排序法______。
下列各种形式的循环中,输出“*”的个数最少的循环是
以下叙述中错误的是
在下列选项中,哪个不是一个算法一般应该具有的基本特征______。
下列程序的作用是:打开顺序文件C:\stuDatA.txt,读取文件中的数据,并将数据显示在窗体上。该程序不完整,请补充完该程序。PrivateSubForm_Click()【】DoWhileNotEOF(1)
在最坏情况下,堆排序需要比较的次数为【】。
输入任意长度的字符串,要求将字符顺序倒置,例如,将输入的“ABCDE”变换成“EDCBA”。请把程序补充完整。PrivateSubCommandl_ClickDima$,i%,c$,d$
数据库系统其内部分为3级模式,即概念模式、内模式和外模式。其中,______是用户的数据视图,也就是用户所见到的数据模式。
一棵二叉树第六层(根结点为第一层)的结点数最多为【】个。
随机试题
老年患者,大便艰涩,排出困难,四肢不温,腹中冷痛,腰膝酸冷,舌淡苔白,脉沉迟,其治疗宜选()(2007年第167题)
企业的文化功能包括娱乐功能。
李密的《陈情表》是一篇( )
摊铺机必须缓慢、均匀、连续不间断地摊铺,不得随意变换速度或中途停顿,以提高()。
对某建设项目进行单因素敏感性分析时发现,当产品价格为800元时,其FIRR=15%当产品价格下降为700元时,其FIRR=10%,当产品价格为500元时,FIRR=0。已知基准收益率为10%,则该项目产品价格下降的临界点为()元。
企业向职工支付职工福利费,应借记的账户是()。
转基因技术,是指将人工分离和修饰过的基因导人到生物体基因组中,以此引起生物体性状可遗传的修饰。下列不属于转基因技术的是:
已知A,B是反对称矩阵,证明:AB一BA是反对称矩阵。
关于远程登录,以下______说法是不正确的。
Questions14-17ChoosetheappropriatelettersA-Dandwritetheminboxes14-17onyouranswersheet.*
最新回复
(
0
)