This repository has been archived on 2020-12-05. You can view files and clone it, but cannot push or open issues or pull requests.
Files
stupid-coding-files/alsocharcount.c
2020-12-07 09:14:40 +02:00

13 lines
296 B
C

#include <stdio.h>
/*ripped off the internet; that's why it's so elegant*/
main (){
int c;
while ((c = getchar()) != EOF) {
if (c == ' ') {
while ((c = getchar()) == ' ');
putchar(' ');
if (c == EOF) break;
}
putchar(c);
}
}