#include void main(){ char ch;while((ch=getchar())!='\n'){ if (ch>='A'&&ch<='Z') ch=ch+32;else if (ch>='a'&&ch<='z') ch=ch-32;printf("%c",ch);}}输入:ABCdef<回车>
A. abcdef
B. abcDEF
C. ABCdef
D. ABCDEF
查看答案
#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. ****!!!!!