Изменить 'du4/program.c'

This commit is contained in:
Pavlo Tverdyi 2020-03-31 18:55:32 +00:00
parent 71f7ae164f
commit a38de64984

View File

@ -4,11 +4,12 @@
#include <ctype.h>
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=='-'){