MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / isOdd

Function isOdd

Examples/NoModules/Appendix A/ExA_10/BadMath.h:6–6  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4
5enum class Oddity { Even, Odd };
6bool isOdd(int x) { return x % 2 != 0; }
7auto getOddity(int x) { return isOdd(x) ? Oddity::Odd : Oddity::Even; }

Callers 1

getOddityFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected