int main(){ char c[256];int i=0;while ((c[i++] = getchar()) != '\n');c[i]='\0';i=0;printf ("%s", c);while(c[i]){ if ('a' <= c[i] && c[i] <= 'z'){ c[i] -= 32;} else if ('A' <= c[i] && c[i] <= 'Z'){ c[i] += 32;} ...
用getchar();可以把换行符读走
输入getchar();吞掉换行符。