How to check whether number is divisible by another number WITHOUT conditional check (if, ternary, etc.) in C#
I have a number, for example, X. I want to check if it is divisible by 3. If it is divisible by 3, I need to return true, otherwise false. But I am not allowed to use if condition, ternary operator, etc. Any suggestions?
Aucun commentaire:
Enregistrer un commentaire