C Program to Check Even or Odd Without Modulous and Bitwise Operator
In this
example we will check even or odd without Modulous Operator. To do this program
we should know what is even and odd number.
Even
Number: Even numbers are those numbers which are divisible by 2. That means if
we divide a number by 2 and if its remainder appears 0 then it is an even
number.
For
Example: 2,4,6,8,10,12,.... are all even numbers.
Odd
Number: Odd numbers are those numbers which are not divisible by 2. That means
if we divide a number by 2 and if its remainder appears 1 then it an odd
number.
For
Example: 1,3,5,7,9,11,........ are all odd numbers.
Program:
Output:
C Program to Check Even or Odd Number using Modulous Operator.
Program:
Output:
NOTE: You Can Comment Your Code if you have solved differently and we will pin it in the comment section. Let's Learn together.
MOTTO:
You Learn, I Learn together We Learn.
Comments
Post a Comment
Please do not spam any link