Created
December 31, 2015 15:10
-
-
Save edinsoncs/a4c85c8b33a35db8b9ba to your computer and use it in GitHub Desktop.
jugando
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
var question = prompt('Ingresa la cantidad'); | |
var question_Two = prompt('Data'); | |
function redondeo(cantidad) { | |
var a = cantidad; | |
return a; | |
} | |
function nacidos(cantidad, vivos, fallecidos) { | |
var a = cantidad; | |
var b = vivos; | |
var c = fallecidos; | |
var result = a + b + c; | |
if(result >= 30 || result == 50) { | |
var t = a - b; | |
result = t + c; | |
console.log('Cantidad de Bebes ' + a); | |
console.log('Resultado Oficial: ' + result); | |
} | |
return result | |
} | |
nacidos(question, redondeo('10'), redondeo('5')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment