diff --git a/cv3/program.c b/cv3/program.c index e97d808..0928689 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -5,10 +5,10 @@ int main() { int coefs[SIZE]; int x = 0; - int input; + int input = 0; int count = 0; - int length; - int result = 0; + int length = 0; + double result = 0.0; while (count < SIZE && scanf("%d", &input) == 1) { coefs[count] = input; @@ -23,7 +23,7 @@ int main() { result = result * x + coefs[i]; } - printf("Result: %d\n", result); + printf("Výsledok je: %.2lf\n", result); return 0; }