Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
5
enum class Oddity { Even, Odd };
6
bool isOdd(int x) { return x % 2 != 0; }
7
auto getOddity(int x) { return isOdd(x) ? Oddity::Odd : Oddity::Even; }
Callers
1
getOddity
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected