From 7b16b9b8290b60a11a8937a955bdea784e86594f Mon Sep 17 00:00:00 2001 From: ak643du Date: Tue, 5 Mar 2024 11:24:09 +0100 Subject: [PATCH] Initialization --- cv3/program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cv3/program.c b/cv3/program.c index f32fcf2..18ec73a 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -5,12 +5,12 @@ int main() { double coefs[SIZE] = {0.0}; double x = 0.0; - double input = 0.0; + char input; int count = 0; int length = 0; double result = 0.0; - while (count < SIZE && scanf("%lf", &input) == 1) { + while (count < SIZE && scanf("%c", &input) == 1) { if (input == 'x') { printf("\n x input \n"); break;