I have used CodeBlocks compiler for debugging purpose. But you can use any C++ programming language compiler as per your availability.
I have used CodeBlocks compiler for debugging purpose. But you can use any C++ programming language compiler as per your availability.
#include <iostream> using namespace std; int isEven(int num) { return !(num & 1); } int main(){ int num; // Inputting number from user cout<<"Enter any number: "; cin>>num; // If isEven() function return 0 then the number is even if(isEven(num)) { //printing even number cout<<"The entered number is even."; } else { //printing odd number cout<<"The entered number is odd."; } return 0; }
04 July 2019 5246 Written By: Rohit
© 2020 Tech Study. All rights reserved | Developed by Tech Study| Privacy Policy | Sitemap