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;
double result = 0.0;
while (count < SIZE && scanf("%lf", &input) == 1) {
coefs[count] = input;
count++;
while (count < SIZE) {
if (scanf("%lf", &input) != 1) {
printf("Nepodarilo sa nacitat polynom na %d mieste.\n", count + 1);
break;
}
if (input == 'x') {
break;
}
}
coefs[count] = input;
count++;
x = coefs[0];
length = count;