Question

Without using the factorial command, create a code that receives a positive integer as the input,...

Without using the factorial command, create a code that receives a positive integer as the input, and prints the reciprocal of its Factorial as the output

Example: ?=4→??????=, -!= , -×0×1×,=, 1-=0.0417 Example: ?=2→??????=, 1!=, 1×,=, 1=0.5

0 0
Add a comment Improve this question Transcribed image text
Answer #1
function result = factorial_reciprocal(n)
    result = 1;
    for i=1:n
        result = result/i;
    end
end

Add a comment
Know the answer?
Add Answer to:
Without using the factorial command, create a code that receives a positive integer as the input,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT