From 8751183000959c5b6944f5372d6c7db85be594da Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Thu, 16 Apr 2020 08:16:13 +0000 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Edu6/program.c=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du6/program.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/du6/program.c b/du6/program.c index ce28f2b..9c792aa 100644 --- a/du6/program.c +++ b/du6/program.c @@ -36,12 +36,21 @@ int main() //int q = 0; size_t pocet_znakov = 0; int antiInfC = 0; + //char r; + while (fgets(line,wSIZE,stdin)) { - if(antiInfC == SIZE - 1){ - break; - } else{ - antiInfC++; - } + if((line[0] == '\n' || isalpha(line[0])!=0 ) && antiInfC == 1) { + break; + } + antiInfC++; + // if (r == '\n') { + // break; + // } + // if(antiInfC == SIZE - 1){ + // break; + // } else{ + // antiInfC++; + // } k = 0; pocet_znakov = strlen(line); char* all = malloc(pocet_znakov);