Answers for "write c++ program takes any number from the user inputs to check whether the number is an even or an odd number using functions."

C++
0

c++ check if number is even or odd

#include <iostream>
using namespace std;
int main() {
   int num = 7;
   if((num & 1) == 0)
   cout<<num<<" is even";
   else
   cout<<num<<" is odd";
   return 0;
}
Posted by: Guest on August-03-2021

Code answers related to "write c++ program takes any number from the user inputs to check whether the number is an even or an odd number using functions."

Browse Popular Code Answers by Language