Added more stupid coding files

This commit is contained in:
2020-12-07 09:14:40 +02:00
parent 4811964a71
commit 1b537cf150
2 changed files with 45 additions and 0 deletions

13
alsocharcount.c Normal file
View File

@@ -0,0 +1,13 @@
#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);
}
}