From 75ec7c77e3146eed6d910512c468b11bfd76e8cf Mon Sep 17 00:00:00 2001 From: Kapliuk Date: Wed, 6 Mar 2024 18:26:42 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=BD=D0=BE=D0=B2=D0=B8=D1=82=D0=B8=20'c?= =?UTF-8?q?v3/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cv3/program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cv3/program.c b/cv3/program.c index 47b85d5..e357001 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -11,7 +11,7 @@ int main(){ fgets(line, 100, stdin); x = strtod(line, NULL); cf1 = ceil(x); - if(cf1 == 0 && line[0] != '\n'){ + if(cf1 == 0 && line[0] != '\n' && x != 0.0){ printf("Nepodarilo sa nacitat zaklad x\n"); return 1; } @@ -21,7 +21,7 @@ int main(){ fgets(line, 100, stdin); cf = strtod(line,NULL); cf1 = ceil(cf); - if(cf1 == 0 && line[0] != '\n'){ + if(cf1 == 0 && line[0] != '\n' && cf != 0.0){ printf("\nNepodarilo sa nacitat polynom na %d mieste.\n", cfIdx); return 1; }