Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function recursion #21

Open
solesensei opened this issue May 27, 2017 · 1 comment
Open

function recursion #21

solesensei opened this issue May 27, 2017 · 1 comment
Labels

Comments

@solesensei
Copy link
Owner

function func(a){
  if ( a == 1) return 1;
    return func(a-1)*a;
}

return 'recursive expression' doesnt work - segfault on execute() - poliz errors

@solesensei solesensei added the bug label May 27, 2017
@dhruvsgarg
Copy link

Hey, I'm new to contributing to open source community, I think I can help you with this.
I replaced the word 'function' with 'int' and the function seems to be working perfectly fine. It performs recursion and returns the factorial. Is that what it is meant to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants