fabs() modification

This commit is contained in:
Michal Utľák 2024-03-20 15:41:07 +01:00
parent f65900ed3e
commit 168f0b444f

View File

@ -36,7 +36,9 @@ int main() {
break; break;
} }
if (fabs(vysledok - ocakavany_vysledok) < 0.0001) { printf("Expected result: %.4f, Actual result: %.4f\n", ocakavany_vysledok, vysledok);
if (fabs(vysledok - ocakavany_vysledok) < 0.01) {
printf("OK\n"); printf("OK\n");
} else { } else {
printf("ZLE\n"); printf("ZLE\n");