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

This commit is contained in:
Pavlo Tverdyi 2020-03-31 11:03:42 +00:00
parent eb4dee21c4
commit e3c1986ed2

View File

@ -5,23 +5,23 @@
int call(double A, double B, double C, char AC){
if(AC=='/'&&B==0){
return printf("CHYBA");;
return printf("CHYBA\n");;
}
else if(AC=='+'){
if(A+B==C)return printf("OK");
return printf("ZLE");
if(A+B==C)return printf("OK\n");
return printf("ZLE\n");
}
else if(AC=='-'){
if(A-B==C)return printf("OK");
return printf("ZLE");
if(A-B==C)return printf("OK\n");
return printf("ZLE\n");
}
else if(AC=='*'){
if(A*B==C)return printf("OK");
return printf("ZLE");
if(A*B==C)return printf("OK\n");
return printf("ZLE\n");
}
else if(AC=='/'){
if(A/B==C)return printf("OK");
return printf("ZLE");
if(A/B==C)return printf("OK\n");
return printf("ZLE\n");
}
}