acm-mjct / Utilities

8 stars 86 forks source link

Create Factorial.js #245

Closed shehlayesha closed 2 years ago

shehlayesha commented 2 years ago

The number to find the factorial of is accepted by user as an input. A variable factorial is Initalized to 1. A for loop is used and the variable i is iterated and multipled till it reaches the number of what the factorial is to be found.