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}
1 Réponse
0
use the % operator:
if (n%2 == 0){
//n is divisible by 2 or null.
}