program to check odd even number by using C++ programming langiage
#include<iostream>
using namespace std;
int main()
{
int i,sum;
cout<<"enter any number : ";
cin>>i;
if(i%2==0)
{
cout<<i<<" is a even number ";
}
else
{
cout<<i<<" is a odd number ";
}
return 0;
}
Output:
enter any number : 22
22 is a even number
Comments
Post a Comment