【填空题】执行下面程序段,x的值为()。 int x = 0; while (x < 5) { x++; }
【填空题】执行下面程序段,x的值为()。 int x = 0; while (x < 5) { x++; }
参考答案和解析
A
相关考题:
有以下程序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
下列程序段执行以后,内存变量y的值是 ______。 x=34567 y=0 DO WHILE x>0 y=x%10+y*10 x=int(x/10) ENDDOA.3456B.34567C.7654D.76543
在VB程序中,以下程序段执行后,x的值为( )x=0Do While x 在VB程序中,以下程序段执行后,x的值为( )x=0Do While xx=(x+2)*(x+3)LoopA.0B.72C.50D.168
有以下程序: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 x=3,y=6,a=0; while(x++!=(y=|)) { a+=1; if(y<x)break; } printf("x=%d,y=%d,a=%d\n",x,y,A) ; }A.x=4,y=4,a=1B.x=5,y=5,a=1C.x=5,y=4,a=3D.x=5,y=4,a=1
执行下列程序段以后,内存变量y的值是( )。x=76543y=0DO WHILE x>0 y=x%10+y*10 x=int(x/10)ENDDOA.3456B.34567C.7654D.76543
下面的程序输出结果是()。includeusing namespace std;void add(){static int x;x++;c 下面的程序输出结果是( )。 #include<iostream> using namespace std; void add() { static int x; x++; cout<<x<<''; } int main() { for(int i=0;i<3;i++) add(); return 0; }A.111B.123C.222D.333
下列程序段执行以后,内存变量y的值是( )。 x=34567 y=0 DO WHILE x0 y=x%10+y*10 x=int(x/10) ENDDOA.3456B.34567C.7654D.76543
有以下程序:main(){int i, j, x=0; for(i=0; i<2; 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
有以下程序:inelude main( ){int i,j,x=0;for(i=0;i 有以下程序:#inelude <stdio.h>main( ){ int i,j,x=0; for(i=0;i<2;i++ ) { x++; for(j=0;j<=3;j ++) { fi(j%2) continue; x++; x++; } pfinff( "x = % d\n",x);} 程序执行后的输出结果是( )。A.x=4B.x=8C.x=6D.x=12
有以下程序: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
下述程序段的执行结果是()。includeVoid main(){int x; for(x=1;x 下述程序段的执行结果是( )。 #include <stdio.h> Void main() { int x; for(x=1;x<=100;x++) if(++x%3==0) if(++x%4==0) if(++x%7==0) printf("%d",x); }A.75B.76C.77D.84
有以下程序: 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
有以下程序: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
下面程序的输出结果是()。includevoid main(){int x=-1,y=5,z;z=(x++ 下面程序的输出结果是( )。#include<iostream.h>void main(){int x=-1,y=5,z;z=(x++<0) (y-->=0);cout<<x<<'\t'<<y<<'\t'<<z<<end1;}A.-1 5 0B.-1 4 1C.0 4 1D.0 4 0
单选题阅读下列代码段int x=3;while (x9) x+=2;x++;while语句成功执行的次数是()。A1B2C3D4