From: Nate Turnage Date: 2006-08-03T08:48:10+09:00 Subject: Re: Learn to Program - Solutions? On 8/2/06, Pablo Tejada wrote: > I just finished chapter 9 and here is my version of the program. > > lineWidth = 50 > toc=['Table of Contents','Chapter 1: Numbers','page 1', > 'Chapter 2: Letters','page 72','Chapter 3: Variables', > 'page 128'] > puts ' ' > al=1 > puts toc[0].center(lineWidth) > puts ' ' > puts ' ' > while al puts toc[al].ljust(lineWidth/2)+toc[al+1].rjust(lineWidth/2) > al=al+2 > end Thanks, Pablo. I think what was throwing me off is that all of the information went into the same array. I was under the impression that each chapter had it's own array nested in a larger array (I am new to this). Thanks, again to everyone that helped me. ~Nate