From 6926cea8e8347e5f8807bbc971a0f90822589be5 Mon Sep 17 00:00:00 2001 From: ak643du Date: Thu, 7 Mar 2024 12:47:55 +0100 Subject: [PATCH] Initialization --- cv3/program.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cv3/program.c b/cv3/program.c index ae3285b..5354867 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -12,8 +12,10 @@ int main() { double result = 0.0; while (count < SIZE) { - if (scanf("%lf", &input) != 1) { - return 0; + printf("+"); + if (scanf("%lf", &input) != 1 && input != '\n') { + printf("-"); + break; } coefs[count] = input;