Skip to content

Instantly share code, notes, and snippets.

@gansai
Created October 5, 2015 18:49
Show Gist options
  • Save gansai/78dfdc2451a022504db6 to your computer and use it in GitHub Desktop.
Save gansai/78dfdc2451a022504db6 to your computer and use it in GitHub Desktop.
Ruby code to illustrate basic programming
#This is my first Ruby code
print "Hi Everyone. How are you?"
puts "Enter a value"
num = gets.to_i
puts "Enter another value"
num_2 = gets.to_i
puts num.to_s + " + " + num_2.to_s + " = " + (num + num_2).to_s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment