Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Ruby N00by

Name: Anonymous 2010-04-25 21:40

What is wrong here?

puts 'What is your favourite number?'
fav_number = gets.chomp
better_number = fav_number.to_i + 1
puts 'A better favourite number would be, ' +better_number+ '!'

Name: Anonymous 2010-04-25 22:32

>>5
no, you wouldn't. you're getting an error because you're already trying to add a string and an int. use .to_s to convert the string to an int so you can just concatenate the three strings together.

and FOR FUCKS SAKE, LEARN TO USE FUCKING SAGE, YOU FUCKING ASSHOLE.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List