From 5dca2572bf6f07883f1f46c97e6c702bf486bc2f Mon Sep 17 00:00:00 2001 From: Artem Horbunov Date: Thu, 5 Mar 2020 20:04:02 +0100 Subject: [PATCH] funguje --- du1/program.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/du1/program.c b/du1/program.c index 2f76fbd..8f228e8 100644 --- a/du1/program.c +++ b/du1/program.c @@ -1,19 +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); + + 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); + }