能帮忙解释下吗 看不太懂
程序代码:
#include <stdio.h> int main(void) { int c; int inspace; inspace = 0; while((c = getchar()) != EOF) { if(c == ' ') { if(inspace == 0) { inspace = 1; putchar(c); } } /* We haven't met 'else' yet, so we have to be a little clumsy */ if(c != ' ') { inspace = 0; putchar(c); } } return 0; }
[ 本帖最后由 回忆、想忘 于 2011-9-25 19:06 编辑 ]