answersLogoWhite

0

For any number n you could use

* (n % 2 == 0), which would be true for an even number, false for odd For an integer i, a simpler method would be

* (i & 1), which would be true for an odd number, false for even

User Avatar

Wiki User

16y ago

Still curious? Ask our experts.

Chat with our AI personalities

CoachCoach
Success isn't just about winning—it's about vision, patience, and playing the long game.
Chat with Coach
BeauBeau
You're doing better than you think!
Chat with Beau
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin

Add your answer:

Earn +20 pts
Q: Write c program to find odd or even no?
Write your answer...
Submit
Still have questions?
magnify glass
imp