How to display whether no. is odd or even but with addition or subtraction or both logic
even odd with addition or subtraction logic only
Collapse
X
-
A number is even if it is evenly divisible by 2.
Just starting tracing 2 over and over from your number until the remainder is less than 2.
If the remainder is 0 the number was even. Otherwise it was odd. -
-
For addition only, start with 0 and add 2 repeatedly. If the result eventually equals the number, the number is even. Otherwise, it is odd.Comment
Comment