How would I make a factorial calculator function?
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!
factorials: n × (n - 1) × (n - 2) ... 2 × 1
you can try using for loop variable to start at
n and go to
and get something to hold the product of the multiplication inside the loop