From 6b87c1225de06cfbac5c578c95050f8bf5ebcc25 Mon Sep 17 00:00:00 2001 From: Rudolf Zambory Date: Fri, 7 Mar 2025 13:52:09 +0100 Subject: [PATCH] alalalalalaald --- du2/program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/du2/program.c b/du2/program.c index e7d23b6..91d80a3 100644 --- a/du2/program.c +++ b/du2/program.c @@ -35,7 +35,7 @@ int main() { while (fgets(line, LINE_SIZE, stdin) != NULL && line[0] != '\n') { if (!is_valid_number(line)) { fprintf(stderr, "Nepodarilo sa nacitat polynom na %d mieste.\n", n + 1); - return 1; // Exit + continue; // Continue to allow the program to finish } coeffs[n++] = strtod(line, NULL); } @@ -43,5 +43,5 @@ int main() { double result = horner(coeffs, n, x); printf("Vysledok je: %.2f\n", result); - return 0; + return 0; // Return 0 for successful execution }