Problem with capitalizing


i am trying to capitalize all the input i put in and the last one to upcase but what i end up in is i only able to get a output my last input into what i tried to make example if i give my input 3 seperate question like what is your name,what is last name,which city.what i get is the last question which city only gets capitalize eve i applied capitalizing to all.please help me

print "your last name"
print "your city"

Replace this line with your code. 


Remember to puts your data:

print "your first name"
first_name = gets.chomp.capitalize
print "your last name"
last_name = gets.chomp.capitalize
print "your city"
city = gets.chomp.capitalize

puts "#{first_name} #{last_name}"
puts "#{city}"


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.