Ari Brown
5/23/2007 6:52:00 PM
On May 23, 2007, at 2:10 AM, Jonndailey wrote:
> In Chris Pine's book, "Learn to Program", he asks you to write a small
> app. I'm having trouble writing this app and I was wondering if anyone
> could help me out.
An excellent book. It's where I learned to program Ruby!
So you'd first want to ask for them. Remember, variables are stored
from right to left.
#use gets.chomp to ask for the name. Store the result in the
appropriate variable.
first_name = gets.chomp
middle_name = gets.chomp
last_name = gets.chomp
#Now we need to add these parts together.
And you're fabulous puts code goes here.
You probably had trouble with how to ask for it, right? I know that's
where I had trouble. puts ing the phrase is just as easy - just puts
each variable, and separate each with a space.
The blind teaching the blind
HTH
---------------------------------------------------------------|
~Ari
"I don't suffer from insanity. I enjoy every minute of it" --1337est
man alive