From 6d21528e78c913ac4774986b737e0f3181309f44 Mon Sep 17 00:00:00 2001 From: ak643du Date: Thu, 7 Mar 2024 13:19:04 +0100 Subject: [PATCH] Initialization --- cv3/program.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cv3/program.c b/cv3/program.c index b675d61..b26c83a 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -11,9 +11,16 @@ int main() { int length = 0; double result = 0.0; - while (scanf("%lf", &input) == 1) { + while (count < SIZE) { + if (scanf("%lf", &input) != 1) { + if (scanf("%c", &input) == 1 && input == 'x') { + printf("123\n"); + return 0; + } + break; + } + coefs[count] = input; - printf("%lf", coefs[count]); count++; }