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