fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n;
  6. cin >> n;
  7. if(n > 0){
  8. cout << n << " is a positive number " << endl;
  9. }
  10. else if(n ==0 ){
  11. cout << n << " is equal to 0" << endl;
  12. }
  13. else cout << n << " is a negative number " << endl;
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5324KB
stdin
23
stdout
23 is a positive number