fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // Input
  6. int n; cin >> n;
  7.  
  8. // Process -> Output
  9. if (n % 2 == 0) {
  10. cout << "n is an even number";
  11. } else {
  12. cout << "n is an odd number";
  13. }
  14.  
  15. return 0;
  16. }
  17.  
  18.  
Success #stdin #stdout 0s 5320KB
stdin
5
stdout
n is an odd number