diff --git a/du4/program b/du4/program index d183456..3fdb4bf 100755 Binary files a/du4/program and b/du4/program differ diff --git a/du4/program.c b/du4/program.c index 27563ce..2ede7ba 100644 --- a/du4/program.c +++ b/du4/program.c @@ -3,14 +3,13 @@ int main(){ int c[2]; - int a, i = 0; + int a = 0; int vysledok; char riadok[999]; char *endptr = NULL; bool first = true; bool second = false; while(1){ - a++; char* r = fgets(riadok,999,stdin); if(*r == '\n'){ break; @@ -33,8 +32,9 @@ int main(){ second = true; continue; }else{ - float v = strtod(riadok,&endptr); - c[i++] = v; + int v = strtod(riadok,&endptr); + c[a] = v; + a = a + 1; continue; } }