_________ case the said goods are not available _________ stock, please inform. us as so
下列程序的运行结果是()。 #include<stdio.h> void main {int s=0,k; for(k=7;k>1;k--) {switch(k) {case 1: case 4: case 7: s++: break; case 2: case 3: case 6:break; case 0: case 5: s+=2: break; }} printf("s=%d",s); }
A. s=3
B.s=4
C.s=5
D.无输出结果
有以下程序
#include<stdio.h>
main()
{int s;
scanf(“%d”,&s);
while(s>0)
{switch(s)
{case 1;printf(“%d”,s+5);
case 2:printf(“%d”,s+4);break;
case 3:printf(“%d”。s+3);
default:printf(“%d”,s+1);break;
}
seanf(“%d”,&s);
}
}
运行时,若输入1 2 3 4 5 O<回车>,则输出结果是
A.6566456
B.66656
C.66666
D.6666656
A.Instead
B.Instead of
C.In case of
D.In return
已知有说明 var s:sting;下列程序段中的错误为:
case s of
‘book_A’:processSelectionA;
‘book_B’:processSelectionB;
‘book_C’:processSelectionC;
end; ()
A.用字符串作为 Case 值表元素
B.case表达式中有常数
C.case常量和case 值表元素
D.case表达式位关系表达式
下列程序运行后的输出结果是 ______。
include<iostream.h>
void main()
{
int s=0,k
for(k=7;k>=0;k--)
{
switch(k)
{
case 1:
case 4:
case 7:s+ +;break:
case 2:
case 3:
case 6:break;
case 0:
case 5:s+=2;break;
}
A.in case
B.even if
C.so that
D.as though
有以下程序: #include<stdio.h>, main() {int S; scanf("%d",&s); while(s>O) {switch(s) {case l:printf("%d",s+5); case 2:printf("%d",s+4);break; case 3:printf("%d",s+3); default:("%d",s+1);break; } scanf("%d",&s); } } 运行时,若输入1 2 3 4 5 0<回车>,由输出结果是()。
A.6566456
B.66656
C.66666
D.6666656
(19 )阅读下列代码
public class Test2005{
public static void main(String args[]){
String s= ″ Test ″ ;
Switch(s){
case ″ Java ″ : System.out.print(″ Java ″ ) ;
break ;
case ″ Language ″ : System.out.print(″ Language ″ ) ;
break ;
case ″ Test ″ : System.out.print(″ Test ″ ) ;
break ;
}
}
}
其运行结果是
A ) Java
B ) Language
C ) Test
D )编译出错