Advertisement
Guest User

Untitled

a guest
Sep 30th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.18 KB | None | 0 0
  1. #!/usr/bin/ruby
  2. print "->"
  3. input = gets
  4. input = input.gsub( /([\w\s])([\w\s]?)/, '\1\2'.upcase)
  5. print input, "\n"
  6. # Output should be user's input, but in this format: "hElLo tHeRe"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement