fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int x;
  6. cout<<"Enter the number you wnat to check" << endl;
  7. cin>>x;
  8. if(x%2==0) cout << "Even!" << endl;
  9. else cout << "Odd!" << endl;
  10. }
Success #stdin #stdout 0.01s 5320KB
stdin
5

stdout
Enter the number you wnat to check
Odd!