Student Stebel
October 29th, 2003, 01:14 PM
Hi
I'm just new to programming and started my studies towards it, so please don't get mad about my amateur question... :D
I need to put the ackermann function :
A(m ; n) =
= n+1 if m=0
= A(m-1 ; 1 ) if (m>0 and n=0)
= A(m-1 ; A(m ; n-1)) if else
in NOT recursive way.
Do you then have idea how to put it into iteration ??
I'd prefer pascal or ada95 code, but will also appreciate in C....
Presently I have no idea how to do it...
Many thanks
I'm just new to programming and started my studies towards it, so please don't get mad about my amateur question... :D
I need to put the ackermann function :
A(m ; n) =
= n+1 if m=0
= A(m-1 ; 1 ) if (m>0 and n=0)
= A(m-1 ; A(m ; n-1)) if else
in NOT recursive way.
Do you then have idea how to put it into iteration ??
I'd prefer pascal or ada95 code, but will also appreciate in C....
Presently I have no idea how to do it...
Many thanks