diff --git a/du1/program.c b/du1/program.c index ab764d8..f1856ce 100644 --- a/du1/program.c +++ b/du1/program.c @@ -15,16 +15,12 @@ int main() { word += 32; } if (word == '\n') { - while (word + i == '\n') { - count++; - i++; - } - i = 0; - printf("\n\nPočet riadkov: %d", count); - count = 0; + count++; } putchar(word); - } + } + printf("\n\nPočet riadkov: %d", count); + return 0; }