以下程序的运行结果是 【 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");}

以下程序的运行结果是 【 9 】 。

main( )

{ int a=2,b=7,c=5;

switch(a>0)

{ case 1:switch(b<0)

{ 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");

}


相关考题:

有以下程序: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

有以下程序includemain(){intx=1,y=0,a=0,b=0; switch(x) {case1:switch(y){case0: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");}

有下列程序:includemain(){ int a=6,b=7,m=1;switch(a%2){ case 0:m++;break;case 1:m 有下列程序:#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 k=5,n=0;while(k>0){switch(k){defhult:break;case 1:n+ 有以下程序 #include<stdio.h> main() {int k=5,n=0; while(k>0) {switch(k) {defhult:break; case 1:n+=k: case 2: case 3:n+=k; } k--; } printf("%d\n",n); } 程序运行后的输出结果是( )A.0B.4C.6D.7

有以下程序:includemain(){int a=6,b=7,m=I;switch(a%2){case 0:m++;break;case 1:m++ 有以下程序: #include<stdio.h> main() {int a=6,b=7,m=I; switch(a%2) {case 0:m++;break; case 1:m++; switch(b%2) {defaut:m++; case 0:m++;break; } } printf("%d\n",m); } 程序运行后的输出结果是( )。A.1B.2C.3D.4

有以下程序: include main ( ) {int k=5,n =0; while ( k>0){switch (k) {default: b 有以下程序: #include <stdio, h>main ( ) { int k=5,n =0; while ( k>0) { switch (k) { default: break; case 1 : n+ =k; case 2 : case3 : n+ =k; } k--; printf( "% d \n" ,n);}程序运行后的输出结果是( )。A.0B.4C.6D.7

有下列程序: include main() {int a=6,b=7,m=1; switch(a%2) {case 0:m++;break; cas 有下列程序:#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