- 填空While(P) S中S执行的次数,最少是____次.做这题 →
- 填空4下面程序段的运行结果是______。 a=1;b=2;c=2; while(a<b<c){t=a;a=b;b=t;c--;} printf("%d,%d,%d",a,b,c); A)1,2,0 B)2,1,0 C)1,2,1 D)2,1,1做这题 →
- 填空5 下面程序段的运行结果是______。 x=y=0; while(x<15) y++,x+=++y; printf("%d,%d",y,x); A)20,7 B)6,12 C)20,8 D)8,20做这题 →
- 填空6下面程序段的运行结果是______。 int n=0; while(n++<=2); printf("%d",n); A)2 B)3 C)4 D)语法错误做这题 →
- 单选11下面程序的功能是在输入一批正整数中求出最大者,输入0结束循环,请选择填空______。 #include "stdio.h" main() {int a,max=0; scanf("%d",&a); while ( ) {if (max<a) max=a; scanf("%d",&a); } printf("%d",max);}做这题 →
- 单选14 C语言中while和do while循环的主要区别是______。做这题 →
- 单选15 以下能正确计算10!的程序段是______。做这题 →
- 填空18 若有语句如下,则程序段的输出是______。 int x=3; do {printf("%d",x-=2);}while(!(--x)); A)1 B)1和-2 C)3和0 D)死循环做这题 →
- 填空23 下面程序的运行结果是______。 #include <stdio.h> main() {int y=10; do {y--;}while(--y); printf("%d\n",y--); } A)-1 B)1 C)8 D)0做这题 →
- 填空25 下面程序的运行结果是______。 #include <stdio.h> main() {int a=1,b=10; do {b-=a;a++;}while(b--<0); printf("a=%d,b=%d\n",a,b); } A)a=3,b=11 B)a=2,b=8 C)a=1,b=-1 D)a=4,b=9做这题 →
- 填空62下面程序的运行结果是______。 #include<stdio.h> main() {int a,s,n,count; a=2;s=0;n=1;count=1; while(count<=7) {n=n*a;s=s+n;++count;} printf("s=%d\n",s); }做这题 →
- 填空64 执行下面程序段后,k值是______。 k=1;n=263; do{k*=n%10;n/=10;}while(n);做这题 →
- 填空65 下面程序段中循环体的执行次数是______。 a=10;b=0; do{b+=2;a-=2+b;}while(a>=0);做这题 →
- 填空67下面程序段的运行结果是______。 i=1;a=0;s=1; do{a=a+s*i;s=-s;i++;}while(i<=10); printf("a=%d",a);做这题 →
- 单选对 C 语言中语句 “while (P) S,” 的含义,下述解释正确的是 ____。做这题 →
- 单选对 C 语言中语句 “while (P) S; ” 的含义,下述解释正确的是____。做这题 →
- 单选下列对C语言中语句“While(p) S;”的解释中,正确的是_________。做这题 →
- 单选C 语言中 While 循环语句属于高级语言四种基本成分中的( )。做这题 →
- 单选语言中的 while 循环语句属于高级语言 4____。做这题 →
- 单选对于 while 语句,错误的说法是( )做这题 →
- 单选下列对 C 语言中语句"while (P) S;"的解释中,正确的是 。做这题 →
- 单选下列对 C 语言中语句"while(P) S;”的解释中,正确的是 __。做这题 →
- 单选while(lx) 中lx与下面的表这式()等价做这题 →
- 填空在 C 语言中, 设整型变量 m 和 n 的值均为 6 , 则执行语句 do m++; while (--n>0) 后, 变量 m 的值是 ____。做这题 →
- 填空下面程序的运行结果是____ #include<stdio.h> main() {int a,s,n,count; a=2; s=0; n=1; count=1; while(count<=7) {n=n*a; s=s+n; ++count;} printf("s=%d",s); }做这题 →
- 单选1 设有程序段 int k=10; while(k=0) k=k-1; 则下面描述中正确的是______。做这题 →
- 填空23 下面程序的运行结果是______。 #include <stdio.h> main() {int y=10; do {y--;}while(--y); printf("%d\n",y--); }做这题 →
- 填空61 执行以下程序时输入right?<CR>,则下面程序的运行结果是______。 #include <stdio.h> main() {char c; while((c=getchar())!='?') putchar(++c); }做这题 →
- 填空下面程序的运行结果是______。 #include<stdio.h> main() {int a,s,n,count; a=2;s=0;n=1;count=1; while(count<=7) {n=n*a;s=s+n;++count;} printf("s=%d\n",s); }做这题 →
- 填空42 若输入一个整数10,以下程序的运行结果是______。 int sub(int a) {int c; c=a%2; return c; } main() {int a,e[10],c,i=0; printf("Input a number:"); scanf("%d",&a); while(a!=0) {c=sub(a); a=a/2; e[i]=c; i++; } for(;i>0;i--) printf("%d",e[i-1]); }做这题 →
- 填空有以下程序: c #include main(){ int a=-2,b=0; while(a++&&++b);printf("%d,%d\n",a,b); } 则程序运行后的输出结果是()做这题 →
- 填空有以下程序 c #include main(){ int a=-1, b=-1; while(++a) ++b; printf("%d,%d\n", a,b); } 程序的运行结果是____。做这题 →
- 填空int x; while(1){scanf("%d", &x); if(x==-1) break;} 若用户输入 9 12 3 -1 5 -1(回车),则上述循环语句被执行的次数为 ____。做这题 →
- 填空在 C 语言中, 运行下列程序后, 输出结果为 ____。 #inc lude<stdio.h> int main (void) int n=5; while(n>'){ n--; printf("%d", n); } return 0; }做这题 →
- 填空在 C 语言中,运行下列程序后,输出结果为 4321 txt #include int main ( void ) { int n =5; while ( n >1) txt { n--; printf ("% d ", n ): } return 0; }做这题 →
- 填空当执行下列程序时, 输入 1234567890<CR>, 则其中 while 循环体将执行____次。 #include <stdio.h> main() {char ch; while((ch=getchar( )=='0')) printf('#'); }做这题 →
- 填空C 语言可以用来实现循环的结构化语句是____、____、____。做这题 →
- 单选程序段"int x=3;do{printf("%d",x--);}while(!x);"的执行结果是____。做这题 →
- 综合迭代至最大循环次数50或找到平方根。 c include int main(){ double num, temp; double lower_bound, upper_bound; int nCount = 50; scanf("%lf",&num); lower_bound = 0; //上界 upper_bound=________________; //下界 while(nCount!=0){ t=________________; if(temp*temp==num){ break; }else if(temp*temp >num){ upper_bound = temp; }else{ lower_bound = temp; } ________; } printf("%f\n", temp); system("pause"); } 江苏省 2023 年普通高校“专转本”选拔考试 计算机专业大类专业综合操作技能 模拟试卷 15做这题 →
- 综合以下程序拟实现计算 s = 1 + 2 * 2 + 3 * 3 + ·s + n * n + ·s,直到 s > 1000 为止。 #include <stdio.h> main(){ int s,n; s=1; n=1; do {n=n+1; s=s+n*n;} while(s>1000); printf("s=%d\n",s); }做这题 →
- 综合有以下程序 c #include main(){ int y=10; while(y--); printf("y=%d\n",y); } 程序执行后的输出结果是____。做这题 →
- 综合(\pi)/(4) = 1 - (1)/(3) +(1)/(5) -(1)/(7) +... +\frac{-1^{n - 1}}{2n - 1} ,求 \pi 。第 n 项值的绝对值 #include void main(){ double sum=0,pi,c=1,s=1;//c 为当前项,s 为符号位 c int n=1; while(__________ >= 1e-6) { sum += c; s=__________; n++; c=__________; } pi=4*sum; printf("pi=%lf\n",pi);做这题 →
- 综合有以下程序 #include main(){int y=10; while(y--); printf("y=%d\n",y); } 程序执行后的输出结果是____。做这题 →
- 单选有以下程序段 main() { ... while( getchar()!='\n'); ... } 以下叙述中正确的是()做这题 →
- 单选有以下程序段 main() { ... while( getchar()!='\n'); ... }以下叙述中正确的是()做这题 →
- 单选若变量已正确定义,有以下程序段 txt i=0; javascript do printf("%d,",i); while(i++); printf("%d\n",i); 其输出结果是()做这题 →
- 单选设有以下程序: txt #include{ Int x=0,s=0; While(!x!=0) s++++x; Printf("%d\n",s); }做这题 →
- 判断在C语言中,为了结束由while语句构成的循环,While的一对圆括号后分号不能少。做这题 →
- 判断若有说明 int c;则 while(c=getchar());是正确的 C 语句。 (做这题 →
- 判断在循环结构的三种语句中,至少执行循环体一次的语句是 do...while。做这题 →
1 / 4下一页