-
-
Save Ifmr24/d317b33e6dfa4eecabf0ddba9d170631 to your computer and use it in GitHub Desktop.
JS Ejercicio 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Hacer un programa que nos diga | |
| si un numero es par o impar | |
| */ | |
| var num = parseInt( prompt("Ingresa un Numero") ) | |
| while(isNaN(num)){ | |
| var num = parseInt( prompt("Ingresa un Numero valido") ) | |
| } | |
| if(num%2 == 0){ | |
| document.write("El numero es par") | |
| } | |
| else if(num == 0){ | |
| document.write("0 no es un numero valido") | |
| } | |
| else{ | |
| document.write("El numero es Impar") | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment