TheAlgorithms / Scala

All Algorithms implemented in Scala
MIT License
1.08k stars 392 forks source link

Added algorithms for factorial calculation #70

Closed Fanfong68 closed 1 year ago

Fanfong68 commented 2 years ago

Pull Request for adding algorithms to calculate factorial

I have added two ways to calculate the factorial of a number (Iterative way and Recursive way). Tests have been done and the scripts are added in this merge.

Let me know if any further changes is required.