diff --git a/cv3/program.c b/cv3/program.c index 48d375f..0a4f81c 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -12,12 +12,13 @@ int main() { while (count < SIZE) { if (scanf("%lf", &input) != 1) { - if (count == 0){ - printf("Nepodarilo sa nacitat zaklad x\n"); + if (scanf("%c", &input) == 1) { + if (count == 0){ + printf("Nepodarilo sa nacitat zaklad x\n"); + return 0; + } + printf("Nepodarilo sa nacitat polynom na %d mieste.\n", count); return 0; - } - printf("Nepodarilo sa nacitat polynom na %d mieste.\n", count); - return 0; } coefs[count] = input; count++;