Last active
August 29, 2015 14:27
-
-
Save kangkyu/c955f2673111f26d5e46 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Write a program that processes the string s = "Welcome to the forum.\nHere you can learn Ruby.\nAlong with other members.\n" a line at a time, using all that we have learned so far. | |
s = "Welcome to the forum.\nHere you can learn Ruby.\nAlong with other members.\n" | |
s.each_line.with_index 1 do |line, line_num| | |
puts "Line #{line_num}: #{line}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment