fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int num;
  6. cout << "Enter a number: ";
  7. cin >> num;
  8. if (num%2==0) {
  9. cout << "The door is opens";
  10. }else {
  11. cout << "The door stays closed";
  12. }
  13. return 0;
  14. }
Success #stdin #stdout 0s 5316KB
stdin
5
stdout
Enter a number: The door stays closed