Created
January 21, 2020 20:58
-
-
Save davidmaogomezz/8fe16b97d283264e3bcd514f936d1dd6 to your computer and use it in GitHub Desktop.
factorial while
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
numero = 7 | |
factorial = 1 | |
while numero > 0 | |
factorial = factorial * numero | |
numero -= 1 | |
end | |
puts factorial |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment