单选题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
单选题
int x=0; int y 10; do { 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
参考解析
解析:
暂无解析
相关考题:
下列程序段执行以后,内存变量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
有下列程序:#include"stdio.h"main(){ int x=0;int y=0;while(x<7++y){ y--;x++;}printf("%d,%d",y,x);}程序的输出结果是( )。A.0,7B.7,7C.0,6D.1,6
下列的程序 段 中与上题的程序段对 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
intx=0;inty10;do{y--;++x;}while(x5);System.out.print(x+,+y);Whatistheresult?() A.5,6B.5,5C.6,5D.6,6
执行下列程序段以后,内存变量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
有下列程序: #include " stdio.h" main() { int x=0; int y=0; while (x<7++y) { y--; x++;} printf("%d,%d",y,x); } 程序的输出结果是( )。A.0, 7B.7, 7C.0,6D.1,6
有下列程序:#includestdio.hmain{ int x=0;int y=0;while(x7 &&++y){ y--;x++;}printf(%d,%d,y,x);}程序的输出结果是( )。A.0,7B.7,7C.0,6D.1,6
有下列程序: #includestdio.h main { int x=0; int y=0; while(x7 &&++v) { y--; x++;} printf("%d,%d",y,x); } 程序的输出结果是( )。A.0,7B.7,7C.0,6D.1,6
设有如下类:class MyPoint {void myMethod() {int x, y;x = 5; y = 3;System.out.print( " ( " + x + ", " + y + " ) " );switchCoords( x, y );System.out.print( " ( " + x + ", " + y + " ) " );}void switchCoords( int x, int y ) {int temp;temp = x;x = y;y = temp;System.out.print( " ( " + x + ", " + y + " ) " );}}如果执行myMethod()方法,则输出结果为?A. (5, 3、(5, 3、(5, 3、B. (5, 3、(3, 5、(3, 5、C. (5, 3、(3, 5、(5, 3、
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
public class WhileFoo { public static void main (String []args) { int x= 1, y = 6; while (y--) {x--;} system.out.printIn(“x=” + x “y =” + y); } } What is the result?() A、 The output is x = 6 y = 0B、 The output is x = 7 y = 0C、 The output is x = 6 y = -1D、 The output is x = 7 y = -1E、 Compilation will fail.
给出以下程序的运行结果: 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
int x = 1, y =6; while (y--) { x++; } System.out.println(“x =” + x + “y =” +y); What is the result?() A、 x = 6 y = 0B、 x = 7 y = 0C、 x = 6 y = -1D、 x = 7 y = -1E、 Compilation fails.
单选题给出以下程序的运行结果: 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 = 1, y =6; while (y--) { x++; } System.out.println(“x =” + x + “y =” +y); What is the result?()A x = 6 y = 0B x = 7 y = 0C x = 6 y = -1D x = 7 y = -1E Compilation fails.
单选题public class WhileFoo { public static void main (String []args) { int x= 1, y = 6; while (y--) {x--;} system.out.printIn(“x=” + x “y =” + y); } } What is the result?()A The output is x = 6 y = 0B The output is x = 7 y = 0C The output is x = 6 y = -1D The output is x = 7 y = -1E Compilation will fail.
单选题有以下程序:#include main(){ int x=0,y=6; do { while(--y)x++; } while(y--); printf(%d,%d,x,y); }程序的运行结果是( )。A5,0B6,0C5,-1D6,-1
单选题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