阅读背景:

Ruby按字母顺序返回我的条目,除了我的第一个条目

来源:互联网 

This is what it looks like.

这就是它的样子。

word = 'word'
words = []


puts 'enter some words, man. ill tell em to you in alphabetical order.'
puts 'when your\'re done, just press enter without typing anything before.'
puts ''
word = gets.chomp
        while word != ''
        word = gets.chomp
        list = list.push word
    end
    puts ''
    puts 'Your alphabetically ordered words are:'
    puts list.sort
    puts ''
word =



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: