Question

How to check if an integer is even or odd in C / C++?


Annonce
Ad

Answer

if (var%2) {
	// Even
}
else {
	// Odd
}


[source]
# ID Query