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