void main(void)
{ 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");
}
#include<stdio.h>
void main(void)
{ 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");
}
考考你,下面的程序输出什么?
#include<stdio.h>
void main(void)
{ 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); defalut:putchar(c+2);break; } printf("\n");
}