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