From 77b6705fc1031c9dfd0334c12517c5efc7a9f74c Mon Sep 17 00:00:00 2001 From: Artem Horbunov Date: Thu, 5 Mar 2020 18:42:03 +0100 Subject: [PATCH] funguje --- du1/program.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 du1/program.c diff --git a/du1/program.c b/du1/program.c new file mode 100644 index 0000000..2f76fbd --- /dev/null +++ b/du1/program.c @@ -0,0 +1,19 @@ +#include + +int main(){ + while(1){ + char ch; + int num = 'a' - 'A'; + scanf("%c", &ch); + if(ch == EOF || ch == -1){ + return 0; + } + if(ch <= 'A' && ch >= 'Z'){ + ch += num; + } + else if(ch >= 'a' && ch <= 'z'){ + ch -= num; + } + printf("%c", ch); + } +}