fork download
  1. // test2.c
  2. #include <stdio.h>
  3.  
  4. int main()
  5. {
  6. int c;
  7. int prev = -1;
  8.  
  9. while ((c = getchar()) != EOF) {
  10. if (c == ' ' && c == prev) {
  11. continue;
  12. }
  13. putchar(c);
  14. prev = c;
  15. }
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0.01s 1680KB
stdin
hoge hoge  hoge   hoge
stdout
hoge hoge hoge hoge