fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int num;
  6. cout << "enter a num \n " ;
  7. cin >> num ;
  8.  
  9. if(num%2 ==0 )
  10. {
  11. cout << "the num is even \n";
  12. }
  13. else
  14. {
  15. cout << "the num is odd \n" ;
  16. }
  17.  
  18.  
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5320KB
stdin
5
stdout
enter a num 
 the num is odd