Skip to content
Sign upLog in

How would I make a factorial calculator function?

Profile icon
RohilPatel

How would I make a factorial calculator function? I need that to make a permutations and combinations calculator. I am pretty sure you would need a loop of some sort, but I'm not sure how to do it. Thanks for the help!

You are viewing a single comment. View All
Profile icon
SixBeeps

@RohilPatel
Make the iterator start from 1 and not 0. Multiplication by 0 just makes the product, well, 0.