Created
October 7, 2012 10:09
-
-
Save rvbsanjose/3847750 to your computer and use it in GitHub Desktop.
Read the Error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def print_and_sort(array) | |
output_string = "" | |
array = array.map! {|str| str.to_s } | |
array.each do |element| | |
output_string = output_string + " " + element | |
end | |
puts output_string | |
array.sort | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment