fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int x;
  5. scanf("%i",&x);
  6. if(x!=0){
  7.  
  8. if(x>0){
  9. printf("%i es positivo",x);
  10. }
  11. else{
  12. printf("%i es negativo",x);
  13. }
  14. }
  15. else
  16. {
  17. printf("%i es cero\n",x);
  18. }
  19.  
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 4416KB
stdin
Standard input is empty
stdout
0 es cero