Created
August 13, 2010 23:35
-
-
Save davidxkr/523720 to your computer and use it in GitHub Desktop.
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
#Feedback from "El gran pregunton" !!!! | |
c = 0 | |
d = 0 | |
5001.times do | |
c += 1 | |
d = d + c | |
end | |
put "the value number is: #{d}" | |
# Al parecer que no te quedo claro el problema | |
# ya que el valor de "d" es el numero triangular correspondiente a 5000 | |
# Por otro lado podemos refactorizar tu codigo de la siguiente forma | |
d = 0 | |
5001.times do |c| | |
d += c | |
end | |
put "the value number is: #{d}" | |
#Recuerda si realmente quieres aprender rails, primero debes de aprender ruby | |
#Puedes preguntar a cualquier miembro del comite estamos para ayudarte a mejorar | |
#Saludos | |
#Por cierto Me debes una caguama y unas Chips Verdes | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment