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

This commit is contained in:
Pavlo Tverdyi 2020-03-31 11:30:05 +00:00
parent a542261a9b
commit b1e6cb9bcc

View File

@ -4,8 +4,8 @@
#include <ctype.h>
int call(float A, float B, float C, char AC){
if(AC=='/'&&B==0||AC!=('+'||'-'||'*'||'-')){
return printf("CHYBA\n");;
if(AC=='/'&&B==0||AC==('+'||'-'||'*'||'-')){
return printf("CHYBA\n");
}
else if(AC=='+'){
if(A+B==C)return printf("OK\n");
@ -22,7 +22,8 @@ int call(float A, float B, float C, char AC){
else if(AC=='/'){
if(A/B==C)return printf("OK\n");
return printf("ZLE\n");
}
}
return printf("CHYBA\n");
}
int main()