Skip to content

Instantly share code, notes, and snippets.

@StephenFiser
Last active August 29, 2015 14:01
Show Gist options
  • Save StephenFiser/916d8fb0993e117935aa to your computer and use it in GitHub Desktop.
Save StephenFiser/916d8fb0993e117935aa to your computer and use it in GitHub Desktop.
p "Enter a number: "
first = gets.chomp.to_i
p "Enter a second number: "
second = gets.chomp.to_i
def multiply(num1, num2)
num1 * num2
end
answer = multiply(first, second)
p "#{first} times #{second} equals #{answer}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment