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;