need FAST reply !please

i confused with my homework,i very don't understand when the programs solution without using pascal,when the theory says:
procedure or function mode
x:=x(y,x)+1
for example:
function A(i:integer;j:integer):integer;
begin
if(i>=2)and(j>=2)then A:=(i-1,A(i,j-1)+1)
else
if(i>=2)and (j=1)then A:=A(i-1,2)
else
if(i=1)and(j>=1)then A:=j
else
a:=-1
end;
the question says when the program called A(4,7) why the answer is 509 explain the way!
i don't know solving the problem when i found this A:=(i-1,4(i,j-1)+1)and A:=(i-1,2)and like A(x-1,y)+1 and ext please help me to know solving this problem
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories