Recursion: An Example

Recursion: An Example

Function Fact(x: integer):Integer

begin

If x < 1 Then

Fact = 1;

Else

Fact := Fact(x-1)*x;

End If

end

W(n) = W(n-1) + 1

Previous slide Next slide Back to the first slide View Graphic Version