Finding even or odd number
This program will show you how you can find a number weather it is even or odd.
#include<iostream.h>
#include<conio.h>
int main()
{
int num;
cout<<"Enter any number="<<endl;
cin>>num;
if(num%2==0)
cout<<"Number is even."<<endl;
if (num%2!==0)
cout<<"Number is odd."<<endl;
getch();
return 0;
}
OutPut:
Enter any number=25
Number is odd.
********************************************************************************************************************