449,387 Members | 1,716 Online
Need help? Post your question and get tips & solutions from a community of 449,387 IT Pros & Developers. It's quick & easy.

# even odd with addition or subtraction logic only

 P: 2 How to display whether no. is odd or even but with addition or subtraction or both logic Jan 20 '16 #1
4 Replies

 Expert Mod 5K+ P: 9,197 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. Jan 20 '16 #2

 P: 2 Not in accordance with question.. Without divide , multiply i only want addition or subtraction logic.. By the thank u for ur concern. :-) Jan 20 '16 #3

 Expert Mod 5K+ P: 9,197 Did you not read that I said to subtract repeatedly? Jan 20 '16 #4

 Expert Mod 5K+ P: 9,197 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. Jan 21 '16 #5