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 == 0) {
  10. cout << "n is a equal to 0";
  11. } else if (n > 0) {
  12. cout << "n is a positive number";
  13. } else {
  14. cout << "n is a negative number";
  15. }
  16.  
  17. return 0;
  18. }
  19.  
  20.  
Success #stdin #stdout 0.01s 5320KB
stdin
7
stdout
n is a positive number