标签:mon bin put nbsp getch demo blog ram math
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.
<C Primer Plus>9 Introducing getchar() and putchar()
标签:mon bin put nbsp getch demo blog ram math
原文地址:http://www.cnblogs.com/michael2016/p/6661489.html