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