diff --git a/du3/program.c b/du3/program.c index c9fce20..3351bf2 100644 --- a/du3/program.c +++ b/du3/program.c @@ -65,7 +65,7 @@ int main() { total = divided(total, atof(equation[i])); break; case '=': - if (total == atof(equation[i])) { + /*if (total == atof(equation[i]))*/if (fabs(total - atof(equation[i])) < 1e-6) { strcpy(output[output_length], "OK"); output_length++; } @@ -88,7 +88,7 @@ int main() { sign = !sign; } memset(equation, 0, sizeof(equation)); - //printf("%s\n",out); + printf("%f", total); } for (int i=0; i