fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int x;
  6. cin>>x;
  7. if (x>0){
  8. x=1;
  9. cout<<x<<endl;
  10. } else if (x<0){
  11. x=-1;
  12. cout<<x<<endl;
  13. }
  14. else {
  15. x=0;
  16. cout<<x<<endl;
  17. }
  18.  
  19. }
  20.  
  21.  
Success #stdin #stdout 0s 4536KB
stdin
-1
stdout
-1