From a7380f143d0a3100f36a143fca2ae9660e43c79e Mon Sep 17 00:00:00 2001 From: Andrii Hermaniuk Date: Fri, 4 Mar 2022 12:38:38 +0100 Subject: [PATCH] funguje --- du1/program.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 du1/program.c diff --git a/du1/program.c b/du1/program.c new file mode 100644 index 0000000..684da7c --- /dev/null +++ b/du1/program.c @@ -0,0 +1,18 @@ +#include + + int main(){ + int counter=0, Sym; + char OutSym; + + while(1){ + Sym=getchar(); + if(Sym==EOF || Sym==0)break; + else if(Sym<='Z'&&Sym>='A')Sym +=32; + else if(Sym<='z'&&Sym>='a')Sym-=32; + counter++; + OutSym=Sym; + putchar(OutSym); +} + printf("\nPočet riadkov: %d\n",counter); + return 0; +}