I'm making a simple Ruby program to add the letters of a person's full name, but I don't know how to add the variables in the code.
puts "What's your first name?"
first = gets.chomp
puts "What's your middle name?"
middle = gets.chomp
puts "What's your last name?"
last = gets.chomp
puts "You have " + first.length.to_s + middle.length.to_s + last.length.to_s + " letters in your name."
If I put a name like "John Jacob Smith", I get "You have 455 letters in your name" instead of "You have 14 letters in your name".