fork(1) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main() {
  5. int numero;
  6.  
  7. printf("Ingrese un número: ");
  8. scanf("%d", &numero);
  9.  
  10. if (numero > 0) {
  11. printf("El número es positivo.\n");
  12. } else if (numero < 0) {
  13. printf("El número es negativo.\n");
  14. } else {
  15. printf("El número es cero.\n");
  16. }
  17.  
  18. system("pause");
  19. }
  20.  
Success #stdin #stdout #stderr 0s 5316KB
stdin
-7






stdout
Ingrese un número: El número es negativo.
stderr
sh: 1: pause: not found