#include<iostream>
int main()
{
int a;
cout<<"Enter a Number : ";
cin>>a;
(a%2==0)?cout<<"Number is even":cout<<"Number is odd";
cin.ignore();
cin.get();
return 0;
}
int main()
{
int a;
cout<<"Enter a Number : ";
cin>>a;
(a%2==0)?cout<<"Number is even":cout<<"Number is odd";
cin.ignore();
cin.get();
return 0;
}
No comments:
Post a Comment