diff options
author | sinanmohd <sinan@firemail.cc> | 2023-05-11 12:26:37 +0530 |
---|---|---|
committer | sinanmohd <sinan@firemail.cc> | 2023-05-11 12:26:37 +0530 |
commit | c2e62961609da793219749028e0477adc980451a (patch) | |
tree | 407038ecacd5ddf3fcef3e95646ee87e5f96383b /7.1/main.c | |
parent | bfe41ee41ad751c558a4483cfdf6317ac3a3d506 (diff) |
7.1: initial commit
Diffstat (limited to '7.1/main.c')
-rw-r--r-- | 7.1/main.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/7.1/main.c b/7.1/main.c new file mode 100644 index 0000000..f210c39 --- /dev/null +++ b/7.1/main.c @@ -0,0 +1,17 @@ +#include <stdio.h> +#include <string.h> +#include <ctype.h> + +int main(int argc, char *argv[]) +{ + char c; + + if (!strcmp(argv[0], "lower")) + while ((c = getchar()) != EOF) + putchar(tolower(c)); + else + while ((c = getchar()) != EOF) + putchar(toupper(c)); + + return 0; +} |