Изменить 'du4/program.c'
This commit is contained in:
parent
71f7ae164f
commit
a38de64984
@ -4,11 +4,12 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
int call( double A, double B, double C, char AC){
|
int call( double A, double B, double C, char AC){
|
||||||
|
double cC=(double)C;
|
||||||
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 || C==cC)return printf("OK\n");
|
||||||
return printf("ZLE\n");
|
return printf("ZLE\n");
|
||||||
}
|
}
|
||||||
if(AC=='-'){
|
if(AC=='-'){
|
||||||
|
Loading…
Reference in New Issue
Block a user