From 3c152db64c754716beb3a5d8882c675669b053ee Mon Sep 17 00:00:00 2001 From: ak643du Date: Tue, 5 Mar 2024 11:48:38 +0100 Subject: [PATCH] Initialization --- cv3/program.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cv3/program.c b/cv3/program.c index 7541170..22876fb 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -11,7 +11,11 @@ int main() { int length = 0; double result = 0.0; - while (count < SIZE && scanf("%lf", &input) == 1) { + while (count < SIZE) { + if (scanf("%lf", &input) != 1) { + printf(":("); + break; + } coefs[count] = input; count++; }