Skip to content

Instantly share code, notes, and snippets.

@AdnanHussainTurki
Created September 17, 2019 20:55
Show Gist options
  • Save AdnanHussainTurki/5888fbe76dd9d05f7f3975908fae79e2 to your computer and use it in GitHub Desktop.
Save AdnanHussainTurki/5888fbe76dd9d05f7f3975908fae79e2 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main() {
cout << "PROGRAM TO CHECK WHETHER THE INPUT NUMBER IS ODD OR EVEN";
cout << "\n";
cout << "=========================================================";
int input;
cout << "\nEnter the interested number:";
cin >> input;
cout << "\nYou have entered:" << input;
(input%2 == 1) ? cout << "\n\nThe given number is ODD" : cout << "\n\nThe given number is EVEN";
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment