题目内容

#include int main(){ int i, s = 0;for(i = 1; i < 10; i++){ s += i * i;if(s > 10) break;}printf("i=%d, s=%d\n", i, s);return 0;}

A. i=3, s=14
B. i=14, s=3
C. i=2, s=13
D. i=13, s=2

查看答案
更多问题

#include void main( ){ char k;int i;for(i=1;i<3;i++){scanf("%c",&k);switch(k){ case '0': printf("another\n");case '1': printf("number\n");}}}输入:01<回车>

A. anotheranotheranother
B. anothernumbernumber
C. anotheranothernumber
D. numbernumbernumber

#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

答案查题题库