diff --git a/du4/program.c b/du4/program.c index d941c4a..d72e235 100644 --- a/du4/program.c +++ b/du4/program.c @@ -19,13 +19,16 @@ int call(float A, float B, float C, char AC){ if(A*B==C)return printf("OK\n"); return printf("ZLE\n"); } - else if(AC=='/'){ - if(A/B==C)return printf("OK\n"); - return printf("ZLE\n"); + if(AC=='/'){ + float Cc=A/B; + Cc=(int)(Cc*100000); + Cc=(float)Cc/100000; + if(Cc==C)return printf("OK"); + printf("%f",Cc); + return printf("ZLE"); } - return printf("CHYBA\n"); + return printf("CHYBA"); } - int main() { char *str;