diff --git a/du1/program b/du1/program index 4f49eff..5902329 100755 Binary files a/du1/program and b/du1/program differ diff --git a/du1/program.c b/du1/program.c index 335c84d..67ed4d4 100644 --- a/du1/program.c +++ b/du1/program.c @@ -15,18 +15,20 @@ int main(){ else if(c >= 'A' && c <= 'Z'){ c=c-'A'+'a'; //male pismeno na velke } + else if(c=='\n'){ + n++; + } } else{ break; } - n++; putchar(c); } printf("\n"); -printf("Počet riadkov: %d\n", n/2); //vypise pocet zpouzitych znakov +printf("Počet riadkov: %d\n", n); //vypise pocet zpouzitych znakov return 0; } \ No newline at end of file