how to find a number is even or odd without using modulus
Answers
Answered by
0
Step-by-step explanation:
Check a number is odd or even without modulus operator
Method 1: Using Loop. The idea is to start with a boolean flag variable as true and switch it n times. ...
Method 2: By multiply and divide by 2. Divide the number by 2 and multiply by 2 if the result is same as input then it is an even number else it is an odd number.
Method 3: Using Bitwise operator &.
Answered by
0
Answer:
if the number is having any even number
Similar questions