diff --git a/du4/program.c b/du4/program.c index 328e61b..df11859 100644 --- a/du4/program.c +++ b/du4/program.c @@ -4,11 +4,12 @@ #include int call( double A, double B, double C, char AC){ + double cC=(double)C; if(AC=='/'&&B==0 || AC==('+'||'-'||'*'||'-')){ return printf("CHYBA\n"); } else if(AC=='+'){ - if(A+B==C)return printf("OK\n"); + if(A+B==C || C==cC)return printf("OK\n"); return printf("ZLE\n"); } if(AC=='-'){