From a38de64984f3c1a49b0b6d79273f5e06274cae23 Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Tue, 31 Mar 2020 18:55:32 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'du4/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du4/program.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/du4/program.c b/du4/program.c index 328e61b..df11859 100644 --- a/du4/program.c +++ b/du4/program.c @@ -4,11 +4,12 @@ #include 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=='-'){