fvdsav
This commit is contained in:
parent
5daafea40d
commit
5ae23bc3db
@ -35,7 +35,7 @@ int main() {
|
|||||||
while (fgets(line, LINE_SIZE, stdin) != NULL && line[0] != '\n') {
|
while (fgets(line, LINE_SIZE, stdin) != NULL && line[0] != '\n') {
|
||||||
if (!is_valid_number(line)) {
|
if (!is_valid_number(line)) {
|
||||||
fprintf(stderr, "Nepodarilo sa nacitat polynom na %d mieste.\n", n + 1);
|
fprintf(stderr, "Nepodarilo sa nacitat polynom na %d mieste.\n", n + 1);
|
||||||
return 1;
|
return 0; // Exit immediately on error but return 0
|
||||||
}
|
}
|
||||||
coeffs[n++] = strtod(line, NULL);
|
coeffs[n++] = strtod(line, NULL);
|
||||||
}
|
}
|
||||||
@ -43,5 +43,5 @@ int main() {
|
|||||||
double result = horner(coeffs, n, x);
|
double result = horner(coeffs, n, x);
|
||||||
printf("Vysledok je: %.2f\n", result);
|
printf("Vysledok je: %.2f\n", result);
|
||||||
|
|
||||||
return 0;
|
return 0; // Return 0 for successful execution
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user