added .chomp to 'gets'

.chomp removed the break line from the input and fixed my output.