Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- puts "Enter the first number"
- a=gets.chomp().to_i
- puts "Enter the second number"
- b=gets.chomp().to_i
- c=a+b # c variable becomes int because a and b are int
- puts "The addition of "+ a.to_s + " and " +b.to_s+ " is " +c.to_s # need to convert everything to string before printing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement