2018-03-26getchar()putchar()函数

#include 
#include 
#define SPACE ' '
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
char ch;
ch=getchar();
while(ch !='\n')
{if(ch==SPACE)
putchar(ch);
else
putchar(ch+1);
ch=getchar(); 
}
putchar(ch);
return 0;
}
捕获.PNG

你可能感兴趣的:(2018-03-26getchar()putchar()函数)