Created
February 27, 2018 00:40
-
-
Save theRemix/7bad7df78162d7ba94c51df757c56711 to your computer and use it in GitHub Desktop.
ClearcutGrimSpellchecker created by theRemix - https://repl.it/@theRemix/ClearcutGrimSpellchecker
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
# subroutine | |
def multiply(x, y) | |
x * y | |
end | |
# variables (input) | |
base = 3 | |
exponent = 3 | |
product = 0 | |
# control flow, for loop | |
for i in 0...exponent | |
product = product + multiply(base, base) | |
end | |
# output | |
print(product) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment