#include <stdio.h>
#define NONBLANK 'a'
int main()
{
int c, lastc;
lastc = NONBLANK;
while((c = getchar()) != EOF)
{
if(c != ' ')
putchar(c);
if(c == ' ')
if (lastc != ' ')
putchar(c);
lastc = c;
}
}
照搬书上的答案...具体的内涵还没搞懂。