Skip to content

Instantly share code, notes, and snippets.

@AdnanHussainTurki
Created September 17, 2019 21:33
Show Gist options
  • Save AdnanHussainTurki/6c8657620e528e94c4860f5a6bfde207 to your computer and use it in GitHub Desktop.
Save AdnanHussainTurki/6c8657620e528e94c4860f5a6bfde207 to your computer and use it in GitHub Desktop.
/*
* @Author: Adnan
* @Date: 2019-08-27 20:33:14
* @Last Modified by: Adnan
* @Last Modified time: 2019-09-18 02:44:17
*/
#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