A
Adam Iggy
i'm new at programing. and i was trying to figure out how you add
numbers. or string? here is the coding
puts 'what is your first name?'
name1= gets.chomp
puts 'how about your middle?'
name2= gets.chomp
puts 'and what about your last name?'
name3= gets.chomp
puts 'did you know there are '+name1.length+name2.length+name3.length+ '
letters in your name?'
the problem is i get the strings combined, not adding the seperate
numbers together.
help?
numbers. or string? here is the coding
puts 'what is your first name?'
name1= gets.chomp
puts 'how about your middle?'
name2= gets.chomp
puts 'and what about your last name?'
name3= gets.chomp
puts 'did you know there are '+name1.length+name2.length+name3.length+ '
letters in your name?'
the problem is i get the strings combined, not adding the seperate
numbers together.
help?