diff --git a/du1/program.c b/du1/program.c index 6d47fc2..c9ad0b2 100644 --- a/du1/program.c +++ b/du1/program.c @@ -7,22 +7,25 @@ int main() char simb; int riad=0; while(1){ - simb=getchar(); - if(islower(simb)){ - simb-=32; + simb=getchar(); + if(islower(simb)){ + simb-=32; + } + else if (isupper(simb)){ + simb+=32; + } + else if(simb==EOF){ + break; + } + putchar(simb); + if(simb=='\n'){ + riad++; + } + if(simb=='\n'){ + riad++; + } } - else if (isupper(simb)){ - simb+=32; - } - else if(simb==EOF){ - break; - } - putchar(simb); - if(simb=='\n'){ - riad++; - } - } - printf("Počet riadkov %d",riad); + printf("\nPočet riadkov: %d\n",riad); return 0; }