Изменить '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> #include <ctype.h>
int call(float A, float B, float C, char AC){ int call(float A, float B, float C, char AC){
if(AC=='/'&&B==0||AC!=('+'||'-'||'*'||'-')){ if(AC=='/'&&B==0||AC==('+'||'-'||'*'||'-')){
return printf("CHYBA\n");; return printf("CHYBA\n");
} }
else if(AC=='+'){ else if(AC=='+'){
if(A+B==C)return printf("OK\n"); if(A+B==C)return printf("OK\n");
@ -23,6 +23,7 @@ int call(float A, float B, float C, char AC){
if(A/B==C)return printf("OK\n"); if(A/B==C)return printf("OK\n");
return printf("ZLE\n"); return printf("ZLE\n");
} }
return printf("CHYBA\n");
} }
int main() int main()