Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (18 sloc) 315 Bytes
#include <stdio.h>
void main()
{
int skip_spaces = 0;
int c;
while((c = getchar()) != EOF) {
if (skip_spaces == 0) {
putchar(c);
}
if (skip_spaces == 1 && c != ' ') {
putchar(c);
skip_spaces = 0;
}
if (c == ' ') {
skip_spaces = 1;
}
}
}
Something went wrong with that request. Please try again.