diff options
| author | Sadeep Madurange <smadurange@users.noreply.github.com> | 2021-11-17 22:44:05 +0800 |
|---|---|---|
| committer | Sadeep Madurange <smadurange@users.noreply.github.com> | 2021-11-17 22:44:05 +0800 |
| commit | b615b3353d827b60c74af84ae4868b7b9c852712 (patch) | |
| tree | 82f0a4a293914ede7e2374048b6e5f9a21c24ce5 | |
| parent | 0c5c723aaa0e9e844f69b995503b823e3f50ae45 (diff) | |
| download | k&r-exercises-b615b3353d827b60c74af84ae4868b7b9c852712.tar.gz | |
1.11
| -rw-r--r-- | 1/11.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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 |
