题目内容

#include void main(){ int a,b;for(a=1,b=1;a<=100;a++){ if(b>20) break;if(b%4==1){ b=b+4;continue;}b=b-5;}printf("a=%d\n",a);}

A. a=6
B. a=7
C. a=8
D. a=96

查看答案
更多问题

#include void main(){int i, j;for(i=2;i>=0;i--){ for(j=1;j<=i;j++)printf("*");for(j=0;j<=2-i;j++)printf("!");printf("\n");}}

A. **!*!!!!!
B. !!!*!!**!
C. **!!!!!!!
D. ****!!!!!

#include void main(){ int sum=0,n;scanf("%d",&n);while(n<=5){ sum+=n;n++;}printf("sum=%d",sum);}输入:1<回车>

A. sum=13
B. sum=14
C. sum=15
D. sum=16

#include int main(){ int i=10,m=0,n=0;do{ if(i%2!=0) m=m+i;else n=n+i;i--;}while(i>=0);printf("m=%d,n=%d\n",m,n);return 0;}

A. m=25,n=30
B. m=30,n=25
C. m=26,n=30
D. m=30,n=26

#include int main(){ int i,j;i=1;while(i<5){ for(j=1;j<2*i+1;j++)printf("%c",'#');printf("\n");i++;}return 0;}

A.
B.
C.
D.

答案查题题库