From 3313bef9a448cbfe8fed08da0e21ecabc1d2a27e Mon Sep 17 00:00:00 2001 From: ak643du Date: Tue, 5 Mar 2024 11:09:13 +0100 Subject: [PATCH] Initialization --- cv3/program.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/cv3/program.c b/cv3/program.c index 5d464fa..f10dd4d 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -11,9 +11,9 @@ int main() { double result = 0.0; while (count < SIZE && scanf("%lf", &input) == 1) { - if (input == x) { - return 0; - } + // if (input == x) { + // return 0; + // } coefs[count] = input; count++; } @@ -22,13 +22,11 @@ int main() { length = count; - result = coefs[0]; - - for (int i = 1; i < length; i ++) { - result = result * x + coefs[i]; + for (int i = 1; i < length; i ++){ + result = result * x + coefs[i]; } printf("Vysledok je: %.2lf\n", result); return 0; -} +} \ No newline at end of file