From e6a33cf6f4c27620470d6c22d020273ae6ac0f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1=C5=A1?= Date: Fri, 8 Mar 2024 08:27:27 +0000 Subject: [PATCH] Update 'cv3/program.c' --- cv3/program.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cv3/program.c b/cv3/program.c index 07b0a09..73eba79 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -17,17 +17,17 @@ int main() { if (scanf("%lf", &x) != 1) { printf("Nepodarilo sa nacitat hodnotu x.\n"); - return 1; + return 0; } while (scanf("%lf", &coef) == 1) { coefficients[count++] = coef; } - + if (!feof(stdin)) { printf("Nepodarilo sa nacitat polynom na %d mieste.\n", count + 1); - return 1; + return 0; } double result = evaluatePolynomial(x, coefficients, count); @@ -35,3 +35,4 @@ int main() { return 0; } +