Skip to content

Instantly share code, notes, and snippets.

@theRemix
Created February 27, 2018 00:40
Show Gist options
  • Save theRemix/7bad7df78162d7ba94c51df757c56711 to your computer and use it in GitHub Desktop.
Save theRemix/7bad7df78162d7ba94c51df757c56711 to your computer and use it in GitHub Desktop.
ClearcutGrimSpellchecker created by theRemix - https://repl.it/@theRemix/ClearcutGrimSpellchecker
# 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