1 #include <stdio.h> 2 #include <math.h> 3 #define SPACE ‘ ‘ 4 int main(void){ 5 char ch; 6 7 while ((ch = getchar()) != ‘\n‘){ 8 if (ch == SPACE){ 9 putchar(ch); 10 } 11 else{ 12 putchar(ch + 1); 13 } 14 } 15 //putchar(ch); 16 17 return 0; 18 }
REMEBER
It demonstates a characteristic C programming style----combing two actions in one expression.
时间: 2024-10-18 21:55:48