diff --git a/du3/program b/du3/program index 436af7d..cef9bcd 100755 Binary files a/du3/program and b/du3/program differ diff --git a/du3/program.c b/du3/program.c index 757a585..9e3974c 100644 --- a/du3/program.c +++ b/du3/program.c @@ -9,7 +9,7 @@ int main(){ char *endptr = NULL; double result = 0; int a; - for(int i = 0; i < SIZE; i++){ + for(int i = 0; i < SIZE; ){ char* r = fgets(riadok,SIZE,stdin); if(*r != '\n'){ if(*r >= 65 && *r <= 122){ @@ -22,7 +22,8 @@ int main(){ } } double v = strtod(riadok,&endptr); - vxod[a++] = v; + vxod[i++] = v; + a = i; }else break; }