diff --git a/cv3/program.c b/cv3/program.c index 03db213..933027d 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -8,7 +8,7 @@ bool IsValidNumber(const char *line) { char *endFtr; strtod(line, &endFtr); - if (endPtr == line){ + if (endFtr == line){ return false; } } @@ -37,7 +37,8 @@ int main() { return 1; } - result = result * x + coeffiecientIndex; + result = result * x; + coefficientIndex++; } printf("Vysledok je: %.2f\n", result);