Initialization
This commit is contained in:
parent
32c42e2558
commit
3313bef9a4
@ -11,9 +11,9 @@ int main() {
|
|||||||
double result = 0.0;
|
double result = 0.0;
|
||||||
|
|
||||||
while (count < SIZE && scanf("%lf", &input) == 1) {
|
while (count < SIZE && scanf("%lf", &input) == 1) {
|
||||||
if (input == x) {
|
// if (input == x) {
|
||||||
return 0;
|
// return 0;
|
||||||
}
|
// }
|
||||||
coefs[count] = input;
|
coefs[count] = input;
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
@ -22,8 +22,6 @@ int main() {
|
|||||||
|
|
||||||
length = count;
|
length = count;
|
||||||
|
|
||||||
result = coefs[0];
|
|
||||||
|
|
||||||
for (int i = 1; i < length; i ++){
|
for (int i = 1; i < length; i ++){
|
||||||
result = result * x + coefs[i];
|
result = result * x + coefs[i];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user