diff --git a/cv3/program.c b/cv3/program.c index 98387b3..30f40e5 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -1,4 +1,5 @@ #include +#include #define SIZE 100 @@ -9,16 +10,15 @@ int main() { int count = 0; int length = 0; double result = 0.0; + double ivrt = 0; while (count < SIZE && scanf("%c", &input) == 1) { - if (input == 'x') { - printf("\n x input \n"); - break; - } - else { - coefs[count] = input - '0'; // Convert character to double - count++; + ivrt = atof(input); + if (ivrt == 0.00){ + printf("String \n"; } + coefs[count] = input; + count++; } x = coefs[0];