diff --git a/cv3/program.c b/cv3/program.c index 176b876..63deaea 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -12,13 +12,13 @@ int main() { double result = 0.0; while (scanf("%lf", &input) == 1) { - if (input == 'x') { - printf("Exiting program.\n"); - return 0; - } coefs[count] = input; count++; } + if (input == 'x') { + printf("Exiting program.\n"); + return 0; + } x = coefs[0]; length = count;