Introduction
This program will read an integer number from user & check whether it is an even or odd number, using switch case statement in c++ programming language. I have used CodeBlocks compiler for debugging purpose. But you can use any C++ programming language compiler as per your availability.
Logic to implement
- Find the modulus of number dividing by 2.
- Check the case values with 1 & 0.
- In the case value 1, number will be odd and case value 0, number will be even.