From 74990de5e1dd5d18699ca6dd7d503358970a272d Mon Sep 17 00:00:00 2001 From: Patrik Seman Date: Thu, 16 Mar 2023 15:48:24 +0100 Subject: [PATCH] program.c --- du4/program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/du4/program.c b/du4/program.c index 1c40cdc..cd09970 100644 --- a/du4/program.c +++ b/du4/program.c @@ -10,7 +10,7 @@ int main(){ float z; char znamienko; - while(fgets(vstup, 100, stdin)!=NULL || *vstup!='\n'){ + while(fgets(vstup, 100, stdin)!=NULL && *vstup!='\n'){ if(sscanf(vstup, "%f %c %f = %f", &x, znamienko ,&y ,&z)!=4){ printf("CHYBA\n"); continue;