From 9988e2d702d74b790cca021894f988e08f85801b Mon Sep 17 00:00:00 2001 From: Andrii Hermaniuk Date: Sun, 27 Mar 2022 14:26:01 +0200 Subject: [PATCH] aaa --- du4/program.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/du4/program.c b/du4/program.c index a0efe91..92a3296 100644 --- a/du4/program.c +++ b/du4/program.c @@ -22,8 +22,10 @@ int main(){ start++; float num2=strtof(start,&end); - float vysledok=4; - + start=end; + float vysledok2=strtof(start,&end); + float vysledok=0; + if(num2==0&&znak=='/'){ printf("CHYBA\n"); } @@ -40,7 +42,7 @@ int main(){ vysledok=num1/num2; } - if (vysledok < 0.001 && vysledok > -0.001){ + if (vysledok2-vysledok < 0.001 && vysledok2-vysledok > -0.001){ printf("OK\n"); } else{