Initialization

This commit is contained in:
Kozar 2024-03-07 14:21:47 +01:00
parent 53206c8a63
commit fca78a4887

View File

@ -6,7 +6,7 @@ int main() {
double coefs[SIZE] = {0.0}; double coefs[SIZE] = {0.0};
double x = 0.0; double x = 0.0;
double input = 0.0; double input = 0.0;
int count = 0; int count = 1;
int length = 0; int length = 0;
double result = 0.0; double result = 0.0;
@ -28,7 +28,7 @@ int main() {
count++; count++;
} }
length = count; length = count-1;
for (int i = 1; i < length; i ++){ for (int i = 1; i < length; i ++){
result = result * x + coefs[i]; result = result * x + coefs[i];