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);