Advertisement
Guest User

ruby porky pig

a guest
Jan 5th, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.22 KB | None | 0 0
  1. print "Please enter a sentence..."
  2. user_input = gets.chomp
  3. user_input.downcase!
  4. if user_input.include? "s"
  5.     user_input.gsub!(/s/, "th")
  6. else
  7.     print "you thuck again"
  8. end
  9. puts "Porky pig says, #{user_input}!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement