black

登录

未知题型

有下列程序,程序运行后单击命令按钮,则输出的结果为( )。Private Sub Command1_Click()Dim a%(1 To 4),b%(3 To 6),i%,s1#,s2# For i=1 To 4 a(i)=i Next i For i=3 To 6 b(i)=i Next i s1=Factorial(A) s2=Factorial(B)Print 's1=';s1;'s2=';s2End SubFunction Factorial(a()As Integer)Dim t#,i% t=1 For i=LBound(A)To UBound(A) t=t*a(i) Next i Factorial=tEnd Function
A.s1=360 s2=24
B.s1=24 s2=360
C.s1=24 s2=24
D.s1=360 s2=360

A.s1=360
B.s1=24
C.s1=24
D.s1=360
【参考答案】

B
解析:Factorial函数的作用是计算参数数组a元素的累计乘积,即将数组a的元素从下界到上界循环相乘。在主......

(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)

相关考题

判断题 The Western philosophy thinks that if two things are different from each other, they are against each other, which means the Westerners focus on the differences of two things rather than the similarities. () A、正确 B、错误

单项选择题 某开放式基金的资产净值是10.7元/单位,前端费用是6%,那么发行价格是(    )? A、11.28 B、11.34 C、11.48 D、11.58

单项选择题 影响人际关系的主要因素有:文化因素,社会因素,心理因素,自然地理和空间因素。由于不同文化的人们在社会化的过程中,习得了不同的世界观、不同的价值观、不同的认知方式、不同的规范,以及不同的角色和角色行为等,因此,不同的文化间的人际关系的处理方式、人际关系的基本原则也会迥然有别。

All Rights Reserved 版权所有©在线考试题库网(zxkao.com)

备案号:湘ICP备14005140号-7

经营许可证号:湘B2-20140064