Subject:
|
Re: A recursion question/test... (fwd)
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Wed, 12 May 1999 03:04:51 GMT
|
Original-From:
|
Jim Choate <ravage@einstein.STOPSPAMssz.com>
|
Viewed:
|
843 times
|
| |
| |
> Date: Tue, 11 May 1999 20:52:16 -0700
> From: JR Conlin <jrconlin@email.com>
> Subject: Re: A recursion question/test...
> At 08:19 PM 5/11/99 -0500, Jim Choate wrote:
> > Describe as simple a recursive algorithm as possible for summing the first n
> > numbers.
Make that 'numbers' into 'positive integers' and it'll make more sense
perhaps.
> Well, you didn't specify if the numbers existed in a list or were
> iterative, and you didn't specify language so:
It's recursive, the only number you know is n. Language is really
irrelevant. I asked for an algorithm. I'll give you a hint, it consists of
two sentences (if you do it in Prolog they are the program).
I'll post them tomorrow morning before I go to work.
____________________________________________________________________
Three step plan: 1. Take over world. 2. Get lot's of cookies.
3. Eat the cookies.
Anonymous
The Armadillo Group ,::////;::-. James Choate
Austin, Tx /:'///// ``::>/|/ ravage@ssz.com
www.ssz.com .', |||| `/( e\ 512-451-7087
-====~~mm-'`-```-mm --'-
--------------------------------------------------------------------
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|