fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n;
  6. cin >> n;
  7. if(n % 2 == 0){
  8. cout << n << " is an even number" << endl;
  9. }
  10. else cout << n << " is an old number " << endl;
  11. return 0;
  12. }
Success #stdin #stdout 0s 5324KB
stdin
2
stdout
2 is an even number