If I have something like:
if (n % 10 == 8 && (n/10) % 10 == 8) count = count + 2;
else if (n % 10 == 8) count++;
Basically, if condition a and b holds, then do something. If only condition a holds, do something else. What is the best logical flow for this?
Aucun commentaire:
Enregistrer un commentaire