From b12dd5025047b7ab8a52e7abebbed517d72bf22e Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Sun, 1 Mar 2020 09:29:47 +0000 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Edu1/program.c=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du1/program.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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; }