I have the very basic function below:
I was recommended to use something related to booleans to further improve this function, should I really look into that? It seems as if using booleans would give no advantage at all with this (besides quicker checking without having to compare the results with ==).Code:int isEven(int x){ return ((x%2) == 0) ? 1 : 0; }
Is there any way this code could be "cleaner"?