网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
看以下JavaScript程序:varx=prompt(“请输入1-5的数字!”);switch(x){case“1”:alert(“one”);case“2”:alert(“two”);case“3”:alert(“three”);case“4”:alert(“four”);case“5”:alert(“five”);default:alert(“none”);}运行以上程序,在提示对话框中输入“4”,依次弹出的对话框将输出()。
A

four,five,none

B

four,none

C

five

D

five,none


参考答案

参考解析
解析: 暂无解析
更多 “单选题看以下JavaScript程序:varx=prompt(“请输入1-5的数字!”);switch(x){case“1”:alert(“one”);case“2”:alert(“two”);case“3”:alert(“three”);case“4”:alert(“four”);case“5”:alert(“five”);default:alert(“none”);}运行以上程序,在提示对话框中输入“4”,依次弹出的对话框将输出()。A four,five,noneB four,noneC fiveD five,none” 相关考题
考题 以下程序的运行结果是 【 9 】 。main( ){ int a=2,b=7,c=5;switch(a0){ case 1:switch(b0){ case 1: printf ("@"); break;case 2: printf("!"); break;}case 0: switch(c==5){ case 0 : printf (" * "); break;case 1 : printf(" # "); break;case 2: printf(" $ "); break;}default : printf("");}printf("\n");}

考题 有以下程序#include stdio.hmain(){ int x=1,y=0,a=0,b=0;switch(x){ case 1:switch(y){ case 0: a++; break;case 1: b++; break;}case 2: a++; b++; break;case 3: a++; b++;}printf("a=%d, b=%d\n",a,b);}程序的运行结果是A)a=1 , b=0B)a=2, b=2C)a=1, b=1D)a=2, b=1

考题 若有定义 : float x=1.5; int a=1,b=3,c=2; 则正确的 switch 语句是A)switch(x){ case 1.0: printf("*\n");case 2.0: printf("**\n");}B)switch((int)x);{ case 1: printf("*\n");case 2: printf("**\n");}C)switch(a+b){ case 1: printf("*\n");case 2+1: printf("**\n");}D)switch(a+b){ case 1: printf("*\n");case c: printf("**\n");}

考题 若有定义:float x=1.5;int a=1,b=3,c=2;,则正确的switch语句是A.switch(x) {case 1.0:printf("*\n"); case 2.0:printf("**\n");}B.switch((int)x); {case 1:printf("*\n"); case 2:printf("**\n");}C.switch(a+B) {case 1:printf("*\n"); case 2+1:printf("**\n");}D.switch(a+B) {case 1:printf("*\n"); case c:printf("**\n");}

考题 请阅读以下程序:#includestdio.hmain(){ int x=1,y=0,a=0,b=0;switch(x){ case 1:switch(y){ case 0:a++;break; }case 2:a++,b++;break; }printf(" a=%d,b=%d\n",a,b);上面程序的输出结果是A.a=2,b=1B.a=1,b=1C.a=1,b=0D.a=2,b=2

考题 请阅读以下程序:includemain(){int x=1,y=0,a=0,b=0;switch(x){case 1:switch(y){case 请阅读以下程序: #include<stdio.h> main() { int x=1,y=0,a=0,b=0; switch(x) { case 1: switch(y) { case 0:a++;break;} case 2: a++,b++;break;} printf("a=%d,b=%d\n",a,b); 上面程序的输出结果是A.a=2,b=1B.a=1,b=1C.a=1,b=0D.a=2,b=2

考题 有以下程序#include stdio.hmain(){ int x=1,y=0,a=0,b=0;switch(x){ case 1:switch(y){ case 0:a++; break;case 1:b++; break;}case 2:a++; b++; break;case 3:a++; b++;}printf("a=%d,b=%d\n",a,b);}程序的运行结果是A.a=1,b=0B.a=2,b=2C.a=1,b=1D.a=2,b=1

考题 有以下程序:includemain(){intx=1,y=0,a=0,b=0;switch(x){case 1:switch(y){case 0:a+ 有以下程序: #include<stdio.h> main() { int x=1,y=0,a=0,b=0; switch(x) { case 1: switch(y) { case 0:a++;break; case 1: b++;break; } case 2:a++;b++;break; case 3:a++;b++; } printf("a=%d,b=%d\n",a,B); } 程序的运行结果是( )。A.a=1,b=0B.a=2,b=2C.a=1,b=1D.a=2,b=1

考题 以下程序段的运行结果是( )。 include main() {int x=2,y=1: switch(x) {case 1: switch 以下程序段的运行结果是( )。 include<stdio.h> main() {int x=2,y=1: switch(x) {case 1: switch(y) {case 0:printf("x=2,y=1\n");break; case 1:printf("y=1\n");break; } case 2:printf("x=2\n"); } }

考题 以下程序的运行结果是( )。main()(int a=2,b=7,c=5;switch(a>0){case 1:switch(b<0){case 1:switch(");break;case 2:printf("!");break;}case 0:switch(c==5){case 0:printf("*");break;case 1:printf("");break;case 2:printf("$");break;}default:printf ("&");}printf("\n");}

考题 若有以下定义,则正确的swish语句是______。 float x;int a,b;A.switch(x) {case 1.0:printf("*\n"); case 2.0:printf("**\n"); }B.switch(x) {case 1,2:printf("*\n"); case 3:printf("**\n"); }C.switch(a+b) {case 1:printf("\n"); case 1+2:printf("**\n"); }D.switch(a+b); {case 1:printf("*\n"); case 2:printf("**\n"); }

考题 若有以下定义:float x;int a,b; 则错误的switch语句是________。 A. switch(x){case 1.0:printf("*\n"); case 2.0:printf("*\n"); }B. switch(a){case 1:printf("*\n");case 2:printf("*\n"); }C. switch(a+b) {case 1:printf("*\n"); case 1+2:printf("*\n"); }D. switch(a+b);{case 1:printf("*\n");case 2:printf("*\n"); }

考题 请阅读以下程序main( ){int x=1,y=0,a=0,b=0;switch(x)case 1:switch(y){case 0:a++;break;case 1:b++;break;}case 2:a++;b++;break;}cout<<"a="<<a<<"b="<<b<<endl;}上面程序的输出结果是A.a=2,b=1B.a=1,b=1C.a=1,b=0D.a=2,b=2

考题 有如下程序:includemain(){int x=1,a=0,b=0; switch(x) {casc 0:b++;case 1:a++;case 有如下程序: #include<stdio.h> main() { int x=1,a=0,b=0; switch(x) { casc 0:b++; case 1:a++; case 2:a++;b++; } printf("a=%d,b=%d\n",a,b); } 该程序的输出结果是( )。A.a=2,b=1B.a=1,b=1C.a=1,b=0D.a=2,b=2

考题 有如下程序:includevoid main(){int x=1,a=0,b=0;switch (x){Case 0: b++;Case 1: 有如下程序:#include<iostream.h>void main(){int x=1,a=0,b=0;switch (x){Case 0: b++;Case 1: a++;Case 2: a++; b++;}cout<<"a="<<a<<","<<"b="<< b;}该程序的输出结果是( )。A.a=2,b=1B.a=1,b=1C.a=1,b=0D.a=2,b=2

考题 有以下程序includemain(){intx=1,y=0,a=0,b=0;switch(X){case1:switch(y){case0:a++;b 有以下程序 #include <stdio.h> main() { int x=1,y=0,a=0,b=0; switch(X) { case 1: switch(y) { case 0:a++; break; case 1:b++; break; } case 2:a++;b++;break; case 3:a++;b++; } printf("a=%d,b=%d\n",a,b); } 程序A.a=1,b=0B.a=2,b=2C.a=1,b=1D.a=2,b=1

考题 有下列程序:includemain(){int x=1,y=0,a=0,b=0;switch(x){ case 1:switch(y){ case 0 有下列程序: #include <stdio.h> main() { int x=1,y=0,a=0,b=0; switch(x) { case 1: switch(y) { case 0:a++;break; case 1:b++;break; } case 2: a++;b++;break; case 3: a++;b++; } printf("a=%d,b=%d\n",a,B) ; } 程序的运行结果是( )。A.a=1,b=0B.a=2,b=2C.a=1,b=1D.a=2,b=1

考题 以下程序的输出结果是main() { int x=l,a=2,b=3; switch(x) { case 0:b++; case 1:a++;break; case 2:a++;b++; } printf("a=%d,b=%d\n",a,b); }

考题 若有以下定义,则正确的switch语句是______。float x;int a,b;A.switch(x) { case 1.0:printf("*\n"); csse 2.0:printf("**\n"); }B.switch(x) { case 1,2:printf("*\n"); case 3:printf("**\n"); }C.switch(a+b) { case 1:printf("\n"); case 1+2:printf("**\n"); }D.switch(a+b); { case 1:printf("*\n"); case 2:printf("**\n"); }

考题 请阅读以下程序 main( ) { int x=1.y=0, a=0, b=0: switch(x) { case 1: switch(y) { case 0: a++; break; case 1: b++; break; } case 2: a++; b++; break; } cout<<"a="<<a<<"b="<<bend1; } 上面程序的输出结果是A.a=2, b=1B.a=1, b=1C.a=1. b=0D.a=2. b=2

考题 若有定义float x=1.5;int a=1,b=3,c=2;,则正确的switch语句是A.swimh(x) {case 1.0:printf("*\n"); case 2.0:printf("**\n");}B.switch((int)x); {case 1:printf("*\n"); case 2:printf("**\n");}C.switch(a+D. {case 1:pfintf("*\n"); case 2+1:pfintf("**\n");}switch(a-I-{case 1:pfintf("*\n"); case c:printf("**\n");}

考题 以下程序输出的结果是( )。 void main( ) { int x = 1,a =0,b =0; switch(x) { case 0:b ++; case 1: a + +; case 2:a ++ ;b ++; } cout <<a <<b;}A.21B.11C.12D.10

考题 若有以下定义:float x;int a,b,c=2;,则正确的switch语句是( )A.switch(x) { case 1.0:printf("*\n"); case 2.0:printf("**\n"); }B.switch(int(x)) { case 1:printf("*\n"); case 2:printf("**\n"); }C.switch(a+b) { case 1:printf("*\n"); case 1+2:printf("**\n"); }D.switch(a+B){ case 1:printf("*\n"); case c:printf("**\n"); }

考题 若定义:float x;int a,b;,则正确的switch语句是( )。A.switch(x) { case1.0:cout<<"*\n"; case2.0:cout<<"**\n";B.switch(x) { case 1.2:cout<<"*\n"; case 3:cout<<"**\n"; }C.switch(a+b) { case 1.0:cout<<"*\n"; case 1+2:cout<<"**\n ";D.switch(a+b) { case 1:cout<<"*\n"; case 2:cout<<"**\n";

考题 有以下程序: include main() {int a=6,b=7,m=1;switch(a%2){ case 0:m++;break;case 1 有以下程序: #include<stdio.h> main() { int a=6,b=7,m=1; switch(a%2) { case 0:m++;break; case 1 :m++; switch(b%2) { defaut:m++; case0:m++;break; } } printf("%d\n",m); }A.1B.2C.3D.4

考题 请阅读以下程序:includemain(){ int x=1,y=0,a=0,b=0;switch(x){ case 1:switch(y){ c 请阅读以下程序: #include<stdio.h> main() { int x=1,y=0,a=0,b=0; switch(x) { case 1: switch(y) { case 0:a++;break; case 2: a++,b++;break;} printf("a=%d,b=%d\n" ,a,b); 上面程序的输出结果是( )。A.a=2,b=1B.a=1,b=1C.a=1,b=0D.a=2,b=2

考题 有以下程序:includemain(){int c;while((c=getchar())!='\n')switch(c-'2'){case 1:pu 有以下程序: #include<stdio.h> main() { int c; while((c=getchar())!='\n') switch(c-'2') {case 1:putchar(c+4); case 2:putchar(c+4);break; case 3:putchar(c+4); case 4:putchar(c+4);break; } printf("\n"); } 输入以下数据,<CR>代表一个回车符, 2743<CR> 程序的输出结果是( )。A.877B.966C.778D.766

考题 看以下JavaScript程序:varx=prompt(“请输入1-5的数字!”);switch(x){case“1”:alert(“one”);case“2”:alert(“two”);case“3”:alert(“three”);case“4”:alert(“four”);case“5”:alert(“five”);default:alert(“none”);}运行以上程序,在提示对话框中输入“4”,依次弹出的对话框将输出()。A、four,five,noneB、four,noneC、fiveD、five,none