Created
December 11, 2012 23:36
-
-
Save massimilianop7/4263391 to your computer and use it in GitHub Desktop.
Encontrar numero entre X y Y (version2)
This file contains 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
function buscarDesdeHasta(desde,hasta,x) | |
{ | |
var arr = new Array(); | |
var longitud= hasta; | |
for (var i=0; i<=longitud; i+=1) | |
{ | |
if (desde<=hasta) | |
{ | |
arr[i]=desde; | |
desde++; | |
}; | |
if (arr[i]==x) | |
{ | |
return i; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment