Added more stupid coding files
This commit is contained in:
13
alsocharcount.c
Normal file
13
alsocharcount.c
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user