Even/Odd Number Checking Code in CPP
Find The Digit ODD And EVEN via Cpp programming?
#include<conio.h>
using namespace std;
int main()
{
int y;
cout<<"Enter Num";cin>>y;
if(y%2==0)
cout<<"Even Num";
else
{
cout<<"Odd Num";
}
getch ();
}
Output Result
By Entering Odd Digit
By Entering Even Digit
Comments
Post a Comment