Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- width = 50
- puts "Let's do some Reading!"
- gets
- toc = ['Table of Contents', 'Chapter 1: Introductions', 'Page 4', 'Chapter 2: Small Talk', 'Page 15']
- puts toc[0].center(width)
- puts toc[1].ljust(width/2) + toc[2].rjust(width/2)
- puts toc[3].ljust(width/2) + toc[4].rjust(width/2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement