Initialization

This commit is contained in:
Kozar 2024-03-05 10:41:49 +01:00
parent 19d013941d
commit af9736b2e7

View File

@ -10,11 +10,21 @@ int main() {
int length = 0; int length = 0;
double result = 0.0; double result = 0.0;
while (count < SIZE && scanf("%lf", &input) == 1) { while (count < SIZE) {
coefs[count] = input; if (scanf("%lf", &input) != 1) {
count++; printf("Nepodarilo sa nacitat polynom na %d mieste.\n", count + 1);
break;
} }
if (input == 'x') {
break;
}
}
coefs[count] = input;
count++;
x = coefs[0]; x = coefs[0];
length = count; length = count;