From 4273744aef58495a6fa668c0e6866f00f35dc82f Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Wed, 1 Apr 2020 10:19:18 +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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/du4/program.c b/du4/program.c index 8df0f6e..67e39fb 100644 --- a/du4/program.c +++ b/du4/program.c @@ -18,8 +18,8 @@ char multi(double A, double B, double C,char AC){ } char divi(double A, double B, double C,char AC){ float CC=A/B; - long double CCC=A/B; - if(CC==C || A/B==C)return printf("OK\n"); + double Cc=(int)((A/B)*100000); + if(CC==C || A/B==C || Cc==(int)(C*100000))return printf("OK\n"); return printf("ZLE\n"); }