Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

even or odd program in c++

#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
  int inp;
  cin>>inp;
  if(inp % 2 == 0)
  {
    cout<<" Even" <<endl;
  }
  else
  {
    cout<<"Odd"<<endl;
  }
}		
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #odd #program
ADD COMMENT
Topic
Name
5+1 =