Write a program that inputs a number and checks whether it is even or odd. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Write a program that inputs a number and checks whether it is even or odd.

21st Mar 2017, 5:03 PM
Tehreem
1 Answer
0
Hello, you can use this function bool isEven(int a) { return (a%2 == 0) }
21st Mar 2017, 7:03 PM
Jérémy BOURGIN