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