From: "Dirien B. Perez" <dperez@newtimes.com>
Subject: Recursion
Date: 1997/10/06
Date: 1997-10-06T00:00:00+00:00 [thread overview]
Message-ID: <34392AFD.280C@newtimes.com> (raw)
Hi I am having some problems with recursion I have the iterative
version of a function that will calculate the sum of the elements is a
linked list:
function sum(list:cell_ptr) return integer is
local:cell_ptr:=list;
s:integer:=0;
begin
while local /= null loop
s:=s+local.value;
local:=local.next
end loop;
return s;
end sum;
I need help creating the recursion version. Also I need to createa
recursive definition of the set of all positive numbers containing only
the digits 3,5 and 9.
I appreciate any help that I can get...... and thank you in advance.
future ada programmer..
next reply other threads:[~1997-10-06 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-10-06 0:00 Dirien B. Perez [this message]
1997-10-06 0:00 ` Recursion Larry Coon
1997-10-09 0:00 ` Recursion Michael F Brenner
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox