diff --git a/main.c b/main.c new file mode 100644 index 0000000..b024003 --- /dev/null +++ b/main.c @@ -0,0 +1,38 @@ +#include + +int main() +{ + int znak; + char znak2; + int pocet=0; + + while(znak=getchar(),znak!=EOF) + { + if(znak>=97 && znak<=122) + { + znak2=znak-32; + putchar(znak2); + } + + else if(znak>=65 && znak<=90) + { + znak2=znak+32; + putchar(znak2); + } + else if(znak=='\n') + { + pocet++; + printf("\n"); + } + else + { + putchar(znak); + } + + } + printf("Počet riadkov: %d",pocet); + printf("\n"); + + + return 0; +} \ No newline at end of file