Initialization
This commit is contained in:
parent
018c286d3a
commit
8a4fdaf01b
@ -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];
|
||||||
|
Loading…
Reference in New Issue
Block a user