fork(1) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6.  
  7. {
  8. int var = 20;
  9. if (var & 1)
  10. cout << "Value of the variable var is odd." << endl;
  11. else
  12. cout << "Value of the variable var is even." << endl;
  13.  
  14. var = 21;
  15. if (var & 1)
  16. cout << "Value of the variable var is odd." << endl;
  17. else
  18. cout << "Value of the variable var is even." << endl;
  19.  
  20. return 0;
  21.  
  22. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
Value of the variable var is even.
Value of the variable var is odd.