From b1e6cb9bccae33533e5f80fd5816a8e483f5e419 Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Tue, 31 Mar 2020 11:30:05 +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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/du4/program.c b/du4/program.c index 1b7baea..d941c4a 100644 --- a/du4/program.c +++ b/du4/program.c @@ -4,8 +4,8 @@ #include 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()