Tuesday 30 December 2014

Write a C++ program to check whether a number is even or odd


#include
using namespace std;
int main()
{
int a;
cout<<"enter no";
cin>>a;
if(a%2==0)
{
cout<<"no is even"< }
else
{ cout<<"no is odd"< }
}

No comments:

Post a Comment

SAY HELLO!!