From 1369c121eddf0c3c6bdbe3ac3691ee6b268dcae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1=C5=A1?= Date: Fri, 8 Mar 2024 08:23:26 +0000 Subject: [PATCH] Update 'cv3/program.c' --- cv3/program.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/cv3/program.c b/cv3/program.c index a277aa0..5eb465a 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -15,18 +15,9 @@ int main() { double coefficients[MAX_COEFFICIENTS]; int count = 0; - printf("Enter the value of x: "); - if (scanf("%lf", &x) != 1) { - printf("Invalid input for x.\n"); - return 1; - } + scanf("%lf", &x); - printf("Enter coefficients from highest to lowest degree, finish with an empty line:\n"); while (scanf("%lf", &coef) == 1) { - if (count >= MAX_COEFFICIENTS) { - printf("Maximum number of coefficients exceeded.\n"); - return 1; - } coefficients[count++] = coef; }