diff --git a/du3/program.c b/du3/program.c index 92d70fe..620b870 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 (fabs(total - atof(equation[i])) < 1e-6) { + /*if (total == atof(equation[i]))*/if (fabs((round(total*100)/100) - atof(equation[i])) < 1e-6) { strcpy(output[output_length], "OK"); output_length++; }