Initialization

This commit is contained in:
Kozar 2024-03-05 11:38:40 +01:00
parent 018c286d3a
commit 8a4fdaf01b

View File

@ -1,4 +1,5 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#define SIZE 100 #define SIZE 100
@ -9,16 +10,15 @@ int main() {
int count = 0; int count = 0;
int length = 0; int length = 0;
double result = 0.0; double result = 0.0;
double ivrt = 0;
while (count < SIZE && scanf("%c", &input) == 1) { while (count < SIZE && scanf("%c", &input) == 1) {
if (input == 'x') { ivrt = atof(input);
printf("\n x input \n"); if (ivrt == 0.00){
break; printf("String \n";
}
else {
coefs[count] = input - '0'; // Convert character to double
count++;
} }
coefs[count] = input;
count++;
} }
x = coefs[0]; x = coefs[0];