Skip to content

Instantly share code, notes, and snippets.

@KaiCode2
Created July 2, 2014 01:03
Show Gist options
  • Save KaiCode2/ebfb7ad7bd02fe51fb9c to your computer and use it in GitHub Desktop.
Save KaiCode2/ebfb7ad7bd02fe51fb9c to your computer and use it in GitHub Desktop.
class Calculator
def addition
print "please enter the first number you want to add: "
number1 = gets.chomp
puts number1
print "please enter the secound number: "
number2 = gets.chomp
puts number2
answer = number1.to_i + number2.to_i
puts "the answer is #{answer}"
end
end
calc = Calculator.new
calc.addition
/* just testing out how gist works with a simple project */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment