Posts by Marciel Leal • 84 points
4 posts
-
-1
votes1
answer39
viewsA: Auto fill a zip code
This seems very much to be the case if the cep comes from a numerical variable. If this is the case, remember that there are no numbers starting with 0 (except 0, obviously). That is, if you have a…
-
1
votes1
answer109
viewsA: Return an array of 6 random numbers between 01 and 60
The function numeroAleatorio below generates a random number between min and max. The generating functionNumerosEntre1a60 will generate an array with n random numbers from the range of [1.60]. const…
-
3
votes2
answers270
viewsA: Use a constructor with multiple parameters, or create multiple sets?
There are some differences between constructor purposes and sets methods: Builders The idea of the builder is construct the object, that is, to give all the structure necessary for that object to…
-
2
votes2
answers121
viewsA: Repeat loop with problem
Maniero’s answer is the most correct one. Just switch to while i < 15: that will no longer have this mistake. I find it interesting that you put a condition so that n1 is less than N2, because if…