更多"下列程序段的执行结果为 a=2 b=0 Select Ca"的相关试题:
[单项选择]下面程序段执行结果为
x=Int(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. fall
[单项选择]下面程序段执行结果为 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
[单项选择]下列程序段的执行结果为
m=1
n=1
Select Case m
Case 1
Select Case n
Case 0
Print" * * 0 * *"
Case 1
Print" * *1* *"
End Select
Case 2
Print" * * 2 * *"
End Select
A. **0**
B. **1**
C. **2**
D. 0
[单项选择]下列程序段的执行结果为
a=1
b=0
Select Case a
Case 1
Select Case b
Cltse 0
Print"**0**"
Case 1
Print"**1**"
End Select
Case 2
Print"**2**"
End Select
A. **0**
B. **1**
C. **2**
D. 0
[单项选择]下列程序段的执行结果为( )。
a=1
b=0
Select Case a
Case 1
Select Case b
Case 0
Print"**1**"
Case 1
Print"**1**"
End Select
Case 2
Print"**2**"
End Select
A. **0**
B. **1**
C. **2**
D. 0
[填空题]下列程序段的执行结果是 【14】 。
x=Int (Rnd+4)
Select Case X
Case 5
Prunt "优秀"
Case 4
Print "良好"
Case 3
Print "合格"
Case Else
Print "不合格"
End Select
[单项选择]执行下面的程序段后,变量c的值为
a=14
b=30
Select Case b/10
Case 0
c=a*10 + b
Case 1 To 9
c=a* 100 +b
Case 10 To 99
c=a * 1000 + b
End Select
Print c
A. 363
B. 2548
C. 1430
D. 9875
[单项选择]下列程和序段的执行结果为 x=Int(Rnd( )+9) Select Case X Case 10 Print "excellent" Case 9 Print "good" Case 8 Print "pass" Case Else Print "fail" End Select
A. excellent
B. good
C. pass
D. fail
[单项选择]下列程序段运行结束后,变量c的值是()。
a=24
b=328
select case b/10
case 0
c=a*10+b
case 1 to 9
c=a*100+b
case 10 to 99
c=a*1000+b
end select
A. 537
B. 2427
C. 24328
D. 240328
[单项选择]下列程序段运行结束后,变量c的值是______。
a=24
b=328
select case b/10
case 0
e=a*10+b
case 1 to 9
c=a*100+b
case 10 to 99
C=a*1000+b
end select
A. 537
B. 2427
C. 24328
D. 240328
[填空题]设有整型变量s,取值范围为0~100,表示学生的成绩。有如左边程序段:右边用Select Case结构改写上述程序,使两段程序所实现的功能完全相同。请填空。
左边:If s>=90 Then
Level="A"
Elself s>=75 Then
Level="B"
ElseIf s>=60 Then
Level="C"
Else
Level="D"
End If
右边:Select Case s
Case______>=90
Level="A"
Case 75 To 89
Level="B"
Case 60 To 74
Level="C"
Case______
Level="D"
______
[单项选择]下列程序段执行的结果为( )。 A="HELLOCANIHELPYOU" B="WANGCHANGLI" C=Left(A,5)十"!" D=Right(A,7) E=Mid(A,6,4) F=Mid(B,Len(B)-6.5)十"!" G=E+" "+D+"!" H=C十" "+F Print H+" "+G
A. HELLO!CHANG!CANIHELPYOU!
B. HELLO!WANG!CANIHELPYOU
C. HELLO!CANIHELPYOU!
D. HELLO!CHANG!CANIHELPYOU!
[单项选择]有如下程序段,该程序段执行完后,共执行循环的次数是 Private Sub Command1_Click( ) Tota1=0 Counter=1 Do Print Counter Tota1=tota1+Counter Print total Counter=Counter+1 If total>=10 Then Exit Do End lf Loop While Counter<=10 End Sub
[单项选择]下列程序段的执行结果为( )。 #include<iostream> using namespace std; class example{ int n; public: example(int i){n=i;} void add( ){s+=n;} static int s; void pr( ){ cout<<s<<endl; } }; int example::s=0; int fuc(char *x); int main( ){ example x(2),y(3),z(4); x. add( ); y. add( ); z.pr( ); return 0; }
A. 2
B. 3
C. 5
D. 6