[单项选择题] 当a=1、b=3、c=5、d=4时,执行下面一段程序后,x的值为______。If a<b ThenIf c<d Thenx=1 Else If a<c Then If b

[单项选择题] 当a=1、b=3、c=5、d=4时,执行下面一段程序后,x的值为______。If a<b ThenIf c<d Thenx=1 Else If a<c Then If b,第1张

[单项选择题] 当a=1、b=3、c=5、d=4时,执行下面一段程序后,x的值为______。 If a<b ThenIf c<d Then x=1 Else If a<c Then If b

[单项选择题] 当a=1、b=3、c=5、d=4时,执行下面一段程序后,x的值为______。 If a<b ThenIf c<d Then x=1 Else If a<c Then If b<d Thenx=2 Elsex=3 End If Else x=6 End If End If Else x=7 End If

A.1

B.2

C.3

D.6

正确答案:

B

参考解析:

当a<b成立时,继续执行;当c<d不成立时,执行else分支;当a<c成立时,继续执行;当b<d成立时,则x=2,随后连续跳出4层end if

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5628257.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-15
下一篇 2022-12-15

发表评论

登录后才能评论

评论列表(0条)

保存