执行下列Java语句: int x = 0; while (x < 3) System.out.println("*" ); x++;显示器将显示()。A.一个星号B.两个星号C.三个星号D.持续显示星号
执行下列Java语句: int x = 0; while (x < 3) System.out.println("*" ); x++;显示器将显示()。
A.一个星号
B.两个星号
C.三个星号
D.持续显示星号
参考答案和解析
ABC
相关考题:
执行下列语句后,输出的结果为______。void run(){static int x=3;x++;cout<<x<<" ";}int main(){for(int i=0;i<2;i++)fun();return D;}
执行下列语句:includeusing namespace std;int main(){int x=3;if(x=5)cout 执行下列语句: #include<iostream> using namespace std; int main() { int x=3; if(x=5) cout<<x++<<end1; else cout<<x<<end1; return 0; } 程序的输出是( )。A.3B.4C.5D.6
有以下程序:include using namespace std;int main (){int x=15;while (x>10 int main () { int x=15; while (x>10x<50) { x++; if (x/3) { x++; break; } } cout<<x<<endl; return 0; } 执行后的输出结果是A.15B.16C.17D.18
有下列程序: main( ) {int i,j,x=0; for(i=0,i2;i++) {x++; for(j=0;j=3;j++) {if(j%2)continue; x++: } x++: } printf("x=%d\n"x); } 程序执行后的输出结果是( )。A.x=4B.x=8C.x=6D.x=12
有以下程序:includeusing namespace std;int main(){ intx=15; while(x>10 有以下程序: #include <iostream> using namespace std; int main() { int x=15; while(x>10x<50) { x++; if(x/3) { x++; break; } } cout<<x<<end1; return 0; }A.15B.16C.17D.18
有以下程序:includeusing namespace std;int main(){int x=15;while(x>10x 有以下程序: #include<iostream> using namespace std; int main() { int x=15; while(x>10x<50) { x++; if(x/3) { x++;break; } } cout<<x<<endl; return 0; } 执行后的输出结果是( )。A.15B.16C.17D.18
有以下程序: include using namespace std; int main( ) { int x=15; while(x>10int main( ){int x=15;while(x>10x<50){x + +;if(x/3){x++; break;}}cout<<x<<endl;return 0;}执行后的输出结果是A.15B.16C.17D.18
有以下程序:inclydeusing namespace std;int main() { int x=15; while(x>10x<50) { x++; if(x/3) { x++;break; } } cout<<x<<endl; return 0; } 执行后的输出结果是A.15B.16C.17D.18
有以下程序: main { int i,j,x=0; for(i=0;i2;i++) { x++; for(j=0;j=3;j++) {if(j=0;j=3;j++) x++; } x++; } printf("x=%d\n",x); } 程序执行后的输出结果是( )。A. x=4B.x=8C.x=6D.x=12
有以下程序:include using namespace std;int main() {int x=15;while(x>10 int main() { int x=15; while(x>10x<50) { x++; if(x/3) { x++; break; } } cout<<x<<end1; return 0; } 执行后的输出结果是A.15B.16C.17D.18
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.
单选题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.
单选题阅读下列代码段int x=3;while (x9) x+=2;x++;while语句成功执行的次数是()。A1B2C3D4