algorithms icon indicating copy to clipboard operation
algorithms copied to clipboard

Made even_or_odd.c more concise

Open rocketry1969 opened this issue 2 years ago • 0 comments

I rewrote the even or odd file replacing the if/else statement with a ternary operator and using the bitwise and operator over the more conventional and conditional operator. By doing this you not only make the code more concise, but using bit operators are faster than other operators. Especially if this repo is for educational purposes it is a neat tool to be introduced to as a beginner.

rocketry1969 avatar Jul 24 '22 14:07 rocketry1969