Initialization
This commit is contained in:
parent
af9736b2e7
commit
b2b446cdf2
@ -11,14 +11,16 @@ int main() {
|
|||||||
double result = 0.0;
|
double result = 0.0;
|
||||||
|
|
||||||
while (count < SIZE) {
|
while (count < SIZE) {
|
||||||
if (scanf("%lf", &input) != 1) {
|
|
||||||
|
if (scanf("%lf", &input) != 1 && (scanf("%c", &input) != 1 || input != 'x')) {
|
||||||
printf("Nepodarilo sa nacitat polynom na %d mieste.\n", count + 1);
|
printf("Nepodarilo sa nacitat polynom na %d mieste.\n", count + 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (input == 'x') {
|
if (input == 'x') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
coefs[count] = input;
|
||||||
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
coefs[count] = input;
|
coefs[count] = input;
|
||||||
|
Loading…
Reference in New Issue
Block a user