fork download
  1. #include <stdio.h>
  2. int main() {
  3. int numero;
  4.  
  5. printf("Introduce un número: ");
  6. scanf("%d", &numero);
  7.  
  8. if (numero > 0) {
  9. printf("El número es positivo\n");
  10. } else {
  11. printf("El número es negativo o cero\n");
  12. }
  13. return 0;
  14. }
Success #stdin #stdout 0s 5292KB
stdin
-8
stdout
Introduce un número: El número es negativo o cero