From 1d489bff98837108f7d0a55966b736db7e34314a Mon Sep 17 00:00:00 2001 From: ak643du Date: Fri, 8 Mar 2024 01:06:52 +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 34de258..69765c0 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -31,8 +31,10 @@ int main() { x = coefs[0]; length = count; - for (int i = 1; i < length; i ++){ - result = result * x + coefs[i]; + while (getchar() != '\n') { + for (int i = 1; i < length; i ++){ + result = result * x + coefs[i]; + } } printf("Vysledok je: %.2lf\n", result);