zaokruhlenie desatinnych cisel
This commit is contained in:
parent
ddf1f313ed
commit
ed35d59346
@ -65,7 +65,7 @@ int main() {
|
|||||||
total = divided(total, atof(equation[i]));
|
total = divided(total, atof(equation[i]));
|
||||||
break;
|
break;
|
||||||
case '=':
|
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");
|
strcpy(output[output_length], "OK");
|
||||||
output_length++;
|
output_length++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user