This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CALCULATE FACTORIAL

HOW DO I CALCULATE THE FACTORIAL OF A NUMBER?

Parents
  • Computer Science textbooks typically take factorial calculation as an example for recursive functions.

    The 8051 is particularly unsuited to recursive functions, so that would not be a good choice if you're thinking of doing it on an 8051.
    An iterative approach would be more appropriate.

    In general, recursion is best avoided in embedded systems...

Reply
  • Computer Science textbooks typically take factorial calculation as an example for recursive functions.

    The 8051 is particularly unsuited to recursive functions, so that would not be a good choice if you're thinking of doing it on an 8051.
    An iterative approach would be more appropriate.

    In general, recursion is best avoided in embedded systems...

Children