From 577da2e684914dfb694a703b527692be7ffdcc85 Mon Sep 17 00:00:00 2001 From: ak643du Date: Mon, 4 Mar 2024 20:16:38 +0100 Subject: [PATCH] Initialization --- cv3/program.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cv3/program.c b/cv3/program.c index cd8417d..04aa690 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -11,14 +11,16 @@ int main() { double result = 0.0; while (count < SIZE && scanf("%lf", &input) == 1) { + coefs[count] = input; + if (input == 'x') { printf("Nepodarilo sa nacitat polynom na %d mieste.", count); return; } - - coefs[count] = input; + count++; + } x = coefs[0];