mercredi 20 novembre 2019

Why is the if condition not met?

I am writing a piece of code that is failing because of the following if the condition not working. Please note that min=3 and range=18. Both are int.

if ((8 >= (min+2*range/10)) && (8 < (min+3*range/10)))
        printf("it works\n");

Aucun commentaire:

Enregistrer un commentaire