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