单选题int x=0; int y=10; do{l3.y--; ++x; }while(x5); System.out.print(x+","+y); What is the result?()A5,6B5,5C6,5D6,6
单选题
int x=0; int y=10; do{l3.y--; ++x; }while(x<5); System.out.print(x+","+y); What is the result?()
A
5,6
B
5,5
C
6,5
D
6,6
参考解析
解析:
暂无解析
相关考题:
阅读下面程序: include void fun(int n) { int x(5); static int y(10); if(n>0) { 阅读下面程序:include<iostream.h>void fun(int n){int x(5);static int y(10);if(n>0){++x;++y;cout<<x<<","<<y<<end1;}}void main(){int m(1);fun(m);}则该程序的输出结果是______。
阅读下面程序: include void f(int n) { int x(5); static int y(10); if(n>0) { ++ 阅读下面程序:include<iostream.h>void f(int n){int x(5);static int y(10);if(n>0){++x;++y;cout<<x<<","<<y<<endl;}}void main(){int m(1);f(m),}则该程序的输出结果是【 】
下列程序段执行以后,内存变量y的值是 ______。 x=34567 y=0 DO WHILE x>0 y=x%10+y*10 x=int(x/10) ENDDOA.3456B.34567C.7654D.76543
下列的程序段中与上题的程序段对y的计算结果相同的是 ______。A.x=34567 y=0 flag=.T. DO WHIL flag y=x% 10+y * 10 x=int(x/10) IF x>0 flag=.F. ENDIF ENDDOB.x=34567 y=0 flag=.T. DO WHIL flag y=x%10+y * 10 x=int(x/10) IF x=0 flag=.F. ENDIF ENDDOC.x=34567 y=0 flag=.T. DO WHIL!flag y=x%10+y* 10 x=int(x/10) IF x>0 flag=.F. ENDIF ENDDOD.x=34567 y=0 flag=.T. DO WHIL!flag y=x%10+y* 10 x=int(x/10) IF x=0 flag=.T. ENDIF ENDDO
下列程序段执行以后,内存变量Y的值是( )。x=34567y=0DO WHILE x>;0y=x%l0+Y*10x=int(x/10)ENDD0A.3456B.34567C.7654D.76543
下列程序段执行以后,内存变量y的值是( )。 CLEAR x=12345 y=0 DO WHILE x>O y=y+x%10 x=int(x/10) ENDDO ?yA.54321B.12345C.51D.15
下列程序 段 执行以后,内存变量 y 的值是x=345 6 7y=0DO WHILE x 0y=x%10+y*10x=int(x/10)ENDDOA)3456B)34567C)7654D)76543
下列的程序 段 中与上题的程序段对 y 的计算结果相同的是A) x=34567y=0flag=.T.DO WHILE flagy=x%10+y*10x=int(x/10)IF x0flag=.F.ENDIFENDDOB ) x=34567y=0flag=.T.DO WHILE flagy=x%10+y*10x=int(x/10) }IF x=0flag=.F.ENDIFENDDOC ) x=34567y=0flag=.T.DO WHILE !flagy=x%10+y*10IF x0flag=.F.ENDIFENDDOD) x=34567y=0flag=.T.DO WHILE !flagy=x%10+y*10x=int(x/10)IF x=0flag=.T.ENDIFENDDO
int x=0;int y=10;do{l3.y--;++x;}while(x5);System.out.print(x+,+y);What is the result?() A.5,6B.5,5C.6,5D.6,6
下列程序段执行以后,内存变量Y的值是( )。 CLEAR x=12345 y=0 DO WHILE x0 y=y+x%10 x=int(x/l 0) ENDD0 7 YA.54321B.12345C.51D.15
执行下列程序段以后,内存变量y的值是( )。x=76543y=0DO WHILE x>0 y=x%10+y*10 x=int(x/10)ENDDOA.3456B.34567C.7654D.76543
下列程序段执行以后,内存变量y的值是( )。 x=34567 y=0 DO WHILE x0 y=x%10+y*10 x=int(x/10) ENDDOA.3456B.34567C.7654D.76543
【程序说明】程序功能是计算一个整数的各位数字之和。【程序】SET TALK OFFINPUT“x=”TO xs=0DO WHILE x!=0s=s+ MOD(x,10)(1)(2)? SSET TALK ON(1)A.x=INT(x*10)B.x=INT(x/10)C.x=x-INT(x/10)D.x=x-INT(x*10)
下列程序段执行以后,内存变量Y的值是( )。x=34567y=0DO WHILE x>;0y=x%l0+Y*10x=int(x/10)ENDD0A.3456B.34567C.7654D.76543
下列程序段执行以后,内存变量Y的值是( )。 CLEAR x=12345 y=O DO WHILE x0 y=y+x%10 x=int(x/l0) ENDDo ?YA.54321B.12345C.51D.15
( 17 )下列程序段执行以后,内存变量 y 的值是x =76543y=0DO WHILE x0y=x%10+y*10x=int(x/10)ENDDOA ) 3456B ) 34567C ) 7654D ) 76543
main( ){ int x=31,y=2,s=0;do{ s-=x*y;x+=2;y-=3;} while( x%3==0);printf(“x=%d\ty=%d\ts=%d\n”,x,y,s);}
int x=0; int y 10; do { y--; ++x; } while (x 5); System.out.print(x + “,“ + y); What is the result?() A、 5,6B、 5,5C、 6,5D、 6,6
给出以下程序的运行结果: SET TALK OFF X=0 Y=0 DO WHILE X10 X=X+1 IF INT(X/2)=X/2 LOOP ELSE Y=Y+X ENDIF ENDDO ?″Y=″,Y RETURN 运行结果为().A、Y=5B、Y=25C、Y=15D、Y=20
int x=0; int y=10; do{l3.y--; ++x; }while(x5); System.out.print(x+","+y); What is the result?()A、5,6B、5,5C、6,5D、6,6
Which two code fragments are most likely to cause a StackOverflowError?()A、int []x = {1,2,3,4,5};for(int y = 0; y 6; y++) System.out.println(x[y]);B、static int[] x = {7,6,5,4};static { x[1] = 8;x[4] = 3; }C、for(int y = 10; y 10; y++)doStuff(y);D、void doOne(int x) { doTwo(x); }void doTwo(int y) { doThree(y); }void doThree(int z) { doTwo(z); }E、for(int x = 0; x 1000000000; x++) doStuff(x);F、void counter(int i) { counter(++i); }
单选题给出以下程序的运行结果: SET TALK OFF X=0 Y=0 DO WHILE X10 X=X+1 IF INT(X/2)=X/2 LOOP ELSE Y=Y+X ENDIF ENDDO ?″Y=″,Y RETURN 运行结果为().AY=5BY=25CY=15DY=20
单选题int x=0; int y=10; do{l3.y--; ++x; }while(x5); System.out.print(x+","+y); What is the result?()A5,6B5,5C6,5D6,6
多选题Which two code fragments are most likely to cause a StackOverflowError?()Aint []x = {1,2,3,4,5};for(int y = 0; y 6; y++) System.out.println(x[y]);Bstatic int[] x = {7,6,5,4};static { x[1] = 8;x[4] = 3; }Cfor(int y = 10; y 10; y++)doStuff(y);Dvoid doOne(int x) { doTwo(x); }void doTwo(int y) { doThree(y); }void doThree(int z) { doTwo(z); }Efor(int x = 0; x 1000000000; x++) doStuff(x);Fvoid counter(int i) { counter(++i); }
单选题int x=0; int y 10; do { y--; ++x; } while (x 5); System.out.print(x + “,“ + y); What is the result?()A 5,6B 5,5C 6,5D 6,6
单选题有以下程序:#include main(){ int x=0,y=6; do { while(--y)x++; } while(y--); printf(%d,%d,x,y); }程序的运行结果是( )。A5,0B6,0C5,-1D6,-1