首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列程序执行后,变量x的值为( )。 Dim a,b,c,d As Single Dim x As Single a=10 b=30 c=400 If b>a Then d=a:a=b:b=d End If If b>c Then x=b Else
下列程序执行后,变量x的值为( )。 Dim a,b,c,d As Single Dim x As Single a=10 b=30 c=400 If b>a Then d=a:a=b:b=d End If If b>c Then x=b Else
admin
2010-11-20
38
问题
下列程序执行后,变量x的值为( )。
Dim a,b,c,d As Single
Dim x As Single
a=10
b=30
c=400
If b>a Then
d=a:a=b:b=d
End If
If b>c Then
x=b
Else If a>c Then
x=c
Else
x=a
End If
选项
A、10
B、30
C、400
D、430
答案
B
解析
程序操作过程如下:程序首先执行If b>a Theh语句,条件为真执行d=a:a=b:b=d语句,执行后d=10,a=30,b=10;然后执行If b>c Then语句,条件不成立,因此执行Else If a>c Then语句;条件不成立,因此执行Else后面的x=a语句,执行后x=30。
转载请注明原文地址:https://kaotiyun.com/show/2Ymp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
有如下程序段:publicclassParent{publicintaddValue(inta,intB){ints;s=a+b;return
下列代码中,将引起编译错误的行是1)publicclassExercise{2)publicstaticvoidmain(Stringargs[]){3)floatf=0.0;4)f+=1.
下列SQL语句中,用于修改表结构的是()
以下各项中属于面向对象程序设计语言不同于其他语言的主要特点的是()。
Java语言中的浮点数默认类型是【】。
结构化程序设计所规定的3种基本控制结构是顺序结构、选择结构和【】。
一个类可以从直接或间接的祖先中继承所有属性和方法。采用这个方法提高了软件的【】。
下列关于Java变量作用域的说法中,不正确的是()。
有序线性表能进行二分查找的前提是该线性表必须是______存储的。
给出下列有关List的表达式,则哪个选项的叙述是对的?( )Listlst=newList(6,true);
随机试题
进行糖异生的主要器官是()
对于增生型肠结核,下列哪项不正确
满足员工自我实现的需要,增强他们的积极性和创造性,体现了沟通的
房地产估价机构设立分支机构的条件包括()等。
自动化仪表是对机电设备运行情况进行()的重要系统。
地下水泥砂浆防水层施工前,基层表面应()。
父母作为监护人代理未成年人进行民事活动属于( )代理。
400,(),
若干个等待访问磁盘者依次要访问的柱面为20,44,40,4,80,12,76,假设每移动一个柱面需要3毫秒时间,移动臂当前位于40号柱面,请按下列算法分别计算为完成上述各次访问总共花费的寻找时间。最短寻找时间优先算法。
CAD、CAM和CAT等,它们都是一种计算机______类软件。
最新回复
(
0
)