All pastes #209106 Raw Edit

strip blanks

public c v1 · immutable
#209106 ·published 2006-10-19 00:48 UTC
rendered paste body
#include <stdio.h>/* Write a program to copy its input to its output, replacing each string of one or more blanks by a single blank */int main (void){  char c, last;  last = '\0';  do {    c = getchar();    if(!(c == 32 && last == 32)) {      putchar(c);    }    last = c;  }while (c != EOF);}