transgalactic
- 1,386
- 0
i tried to trace this recurtion for small numbers
but i don't know how to write down
in an organized way
a(0,0) is easy its 1
a(1,0) a little harder it returns 2
but when i get to
a(2,0) i get confused and i cand follow one logical path
i don't how to write it down
i tried like that:
a(n=2,count=0):
for (0,0<2)
count=a(0,0)=1
for (1,1<2)
count=a(1,1)
a(1,1)
for (0,0<1)
count=a(0,1)
a(0,1)=2
here i am getting really confused
??
but i don't know how to write down
in an organized way
Code:
int a(int n,int count){
int i;
for(i=0;i<n;i++)
count =a(i,count);
return count+1;
}
a(0,0) is easy its 1
a(1,0) a little harder it returns 2
but when i get to
a(2,0) i get confused and i cand follow one logical path
i don't how to write it down
i tried like that:
a(n=2,count=0):
for (0,0<2)
count=a(0,0)=1
for (1,1<2)
count=a(1,1)
a(1,1)
for (0,0<1)
count=a(0,1)
a(0,1)=2
here i am getting really confused
??