写出以下循环语句的循环条件、循环终止条件和修改循环条件的语句。inti=1,n=1;while(1){n+=i;i++;if(n>1000)break;}
举一反三
- 一下不构成无限循环的语句或语句组是()。 A: n=0;do{n++;}while(n<=0); B: n=0;while(1){n++;} C: n=10;while(n);{n--;} D: for(n=0,i=1;;i++)n+=i;
- 下列不构成无限循环的语句或语句组是( )。 A: n=0; B: do++n;)while(n<=0); C: n=0; D: while(1)n++; E: while(n=10);n--; F: for(n=0,i=1; ;i++)n+=i
- 以下不构成无限循环的语句或语句组是____。 A: n=0;while(1)<br/>{ n++; } B: n=0;do{++n;}<br/>while(n C: n=10;while(n)<br/>;{n--;} D: for(n=0,i=1;;i++)<br/>n+=i;
- 下列不构成无限循环的语句或语句组是()。 A: n=0; B: do ++n; while (n<=0); C: n=0; D: while (1) n++; E: n=10; F: While (n); n--; G: for(n=0, i=1; ;i++)n+=i
- 【单选题】若如下不构成无限循环的语句或语句组是(). A:n=0; do{++n;}while(n<=0); B:n=0; while(1) {n++;} C:n=10; while(n);{n--;} D:for(n=0,i=1; ;i++) n+=i; A. n=0; do{++n;}while(n<=0); B. n=0; while(1) {n++;} C. n=10; while(n);{n--;} D. for(n=0,i=1; ;i++) n+=i;