0

How to write this condition?

i want to write it in code... condition is " if given number is divisible by two". eg: if(condition) { cout{ //statement} else {//statement}

28th Sep 2018, 3:17 AM
Mubarak Hussain
Mubarak Hussain - avatar
1 Odpowiedź
0
use the % operator: if (n%2 == 0){ //n is divisible by 2 or null. }
28th Sep 2018, 5:38 AM
ifl
ifl - avatar