exc/k&r/01-a-tutorial-introduction/01-09.c

15 lines
204 B
C

#include <stdio.h>
#define BLANK ' '
void main()
{
int c, prev = -1;
while ((c = getchar()) != EOF) {
if (prev != BLANK || c != BLANK)
putchar(c);
prev = c;
}
}