题目内容

下面程序段运行时从键盘上输入:2473↙,其输出结果是______。#include int main(){int c;while ( (c = getchar() ) != '\n' )switch ( c - '2' ){case 0:case 1: putchar( c + 4 );case 2: putchar( c + 4 ); break;case 3: putchar( c + 3 );default: putchar( c + 2 ); break;}printf( "\n" );return(0);}

查看答案
更多问题

下面程序的运行结果是______。#includevoid main( ){ int a=1, b=10;do{ b-=a; a++;} while(b--<0);printf("%d, %d\n", a, b); }

下面程序运行结果是______。#includevoid main( ){ int a, b; a=-1; b=0;do{ ++a; ++a; b+=a;} while(a<9);printf("%d\n", b); }

下面程序的运行结果是______。#includevoid main( ){ int i, j=4;for(i=0; i<4; i++)switch(i/j){ case 0: case 1: printf("*"); break; case 2: printf("#"); } }

编程计算1+3+5+……+101的值,请在横线上填写适当的语句。#include void main( ){int i, sum=0;for (i=1;______;______)sum=sum + i;printf("sum=%d\n", sum); }

答案查题题库