diff --git a/du5/program.c b/du5/program.c index 1ca06a8..adc5838 100644 --- a/du5/program.c +++ b/du5/program.c @@ -40,11 +40,15 @@ int main(int argc, char const *argv[]){ if (r == NULL){ break; } + if(line[0]=='\n'){ + break; + } char* end = NULL; int value = strtol(line,&end,10); if (value == 0){ - break; + printf("Nepodarilo nacitat nic\n"); + return 0; } char tmp[SIZE]; memset(tmp, 0, SIZE);