divide fix

This commit is contained in:
Michal Utľák 2024-03-20 15:24:14 +01:00
parent f19da58d2d
commit f5b7505a79

View File

@ -1,5 +1,6 @@
#include <stdio.h>
#include <string.h>
#include <math.h>
char pole[100];
@ -27,16 +28,14 @@ int main() {
else {
printf("Nulou sa nedeli!\n");
return 0;
break;
}
break;
default:
printf("Zle znamienko!\n");
return 0;
break;
}
if ((int)vysledok == ocakavany_vysledok) {
if (fabs(vysledok - (float)ocakavany_vysledok) < 0.0001) {
printf("OK\n");
} else {
printf("ZLE\n");