已知x代表某个百分制成绩,下列程序段用于显示对应的五级制成绩,正确的是( )A.If x>=60 Then Print"及格" Else If x>=70 Then Print"中" Else If x>=80 Then Print"良" Else If x>=90 Then Print"优" Else Print"不及格" End IfB.If x<90 Then Print"良" Else If x<80 Then Print"中" Else If x<70 Then Print"及格" Else I

题目

已知x代表某个百分制成绩,下列程序段用于显示对应的五级制成绩,正确的是( )

A.If x>=60 Then Print"及格" Else If x>=70 Then Print"中" Else If x>=80 Then Print"良" Else If x>=90 Then Print"优" Else Print"不及格" End If

B.If x<90 Then Print"良" Else If x<80 Then Print"中" Else If x<70 Then Print"及格" Else If x<60 Then Print"不及格" Else Print"优" End If

C.If x>=90 then Print"优" Else If x>=80 Then Print"良" Else If x>=70 Then Print"中" Else If x>=60 Then Print"及格" Else Print"不及格" End If End Select

D.Select Case x Case x>=90 Print"优" Case x>=80 Print"良" Case x>=70 Print"中" Case x>=60 Print"及格" Case Else Print"不及格"


相似考题
更多“已知x代表某个百分制成绩,下列程序段用于显示对应的五级制成绩,正确的是()A.If x>=60 Then Print ”相关问题
  • 第1题:

    写出程序段对应的运行结果 int x = 4; System.out.print("x=" +((x > 4) ? 99.99 : 9));


    false

  • 第2题:

    写出程序段对应的输出结果 int x = 125; System.out.print(x/10);


    c

  • 第3题:

    写出以下程序段对应的输出结果 int x = 23659; String m = "result="; while (x>0) { m = m + x%10; x = x/10; } System.out.print(m);


    D ++是自增运算符,但作为前缀和后缀是不一样的,对于变量本身没有差别,但对于表达式的值有影响,x++,表达式先去x的值5作为输出,然后再加1,++y是先增1,然后取自增后的值为表达式的值,所以输出结果为11

  • 第4题:

    设 x = 1; y = 10,下列语句能正确运行结束的是________。

    A.if(x>y) print(x)

    B.max = x >y ? x : y

    C.if x>y max=x

    D.if x<y: min=x else: min=y


    B

  • 第5题:

    【其它】编写程序:某学生有两门考试课程,实行百分制考核。编写程序,输入这两门课程的成绩,计算其平均成绩。


    开卷,30%