DEV Community

Mohammed Salah
Mohammed Salah

Posted on

C++ 7th code (if-->odd&even)

#include<iostream>
using namespace std;
int main()
{int a;
cout<<" \n\n\n  \t\t\t  Enter the number : ";
cin>>a;
cout<<"\n--------------------------------\n" ;
if(a%2==0)
{cout<<" \n\n\t The number is --> Even Number    \n " <<endl;}
else
{
cout<<" \n\n\t The number is  --> odd Number" <<endl;}
cout<<" \n ---------------------";
cin.get();
return 0 ;}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)