niusouti.com

下列程序段的执行结果为______。 x=Int (Rnd+4) Select Case x Case 5 Print“优秀” Case 4 Print“良好” Case 3 Print“通过” Case Else Print“没有通过” End SelectA. 优秀B.良好C.通过D.没有通过

题目

下列程序段的执行结果为______。 x=Int (Rnd+4) Select Case x Case 5 Print“优秀” Case 4 Print“良好” Case 3 Print“通过” Case Else Print“没有通过” End Select

A. 优秀

B.良好

C.通过

D.没有通过


相似考题
参考答案和解析
正确答案:B
更多“下列程序段的执行结果为______。x=Int (Rnd+4)Select Case xCase 5 Print“优秀”Case 4 Print“良好 ”相关问题
  • 第1题:

    下面程序段执行结果为x=Iht(Rnd()+4)Select Case x Case 5 Print"excellent" Case 4 Print"good" Case 3 Print"paSS" Case Else Print "fail"End Select

    A.excellent

    B.good

    C.pass

    D.fail


    正确答案:B
    解析:我们可以看到x=Int(Rnd()+4)语句,其中,Rnd是用来产生随机数的,其值在0~1之间,而在(Rnd()+4)前面有Int进行强制转换,所以x总为4,SelectCasex…EndSelect语句体中的Case4CR>Print"good"语句。所以正确答案是选项B.

  • 第2题:

    下面程序段执行结果为 x=Int(Rnd()+3) Select Case x Case 5 Print "excellent" Case 4 Print "good" Case 3 Print"pass" Case Else Print"fail" End Select

    A.excellent

    B.good

    C.pass

    D.fail


    正确答案:C
    解析:本题中可以看到x=Int(Rnd()+3)语句,其中Rnd用来产生随机数,其值在0~1之间,而在(Rnd()+3)前面有Int进行强制转换,所以x为3,执行Print"pass"语句。

  • 第3题:

    下列程序段的执行结果是()。 Dim x As Integer x = 6 Select Case x Case 5 Print "优秀" Case 4 Print "良好" Case 3 Print "通过" Case Else Print "不通过" End Select

    A.优秀

    B.良好

    C.通过

    D.不通过


    C

  • 第4题:

    下面程序段执行结果为( )。 x=Int(Rnd()+4) Select Case x Case 5 Print"excellent" Case4 Print"good" Case 3 Print"pass" Case Else Print"fail" End Select

    A.excellent

    B.good

    C.pass

    D.fail


    正确答案:B

  • 第5题:

    下列程序段的运行结果为()。 Dim x x = Int(Rnd) + 5 Select Case x Case 5 Print "优秀" Case 4 Print "良好" Case 3 Print "及格" Case Else Print "不及格" End Select

    A.不及格

    B.良好

    C.及格

    D.优秀


    c