summaryrefslogtreecommitdiffstats
path: root/1/11.c
diff options
context:
space:
mode:
Diffstat (limited to '1/11.c')
-rw-r--r--1/11.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/1/11.c b/1/11.c
new file mode 100644
index 0000000..5f6d386
--- /dev/null
+++ b/1/11.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+
+/* prints input one word per line */
+int main(int argc, char *argv[]) {
+ int c;
+
+ while ((c = getchar()) != EOF) {
+ if (c == ' ' || c == '\t')
+ printf("\n");
+ else
+ putchar(c);
+ }
+
+ return 0;
+} \ No newline at end of file