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; }