SHARE
TWEET

Factorial Division

Alexzandur Oct 18th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve(num1, num2) {
  2.  
  3.     let recursed1 = num1;
  4.     let result = 1;
  5.    
  6.     for (let i = 0; i < num1; i++) {
  7.  
  8.         recursed1 = (num1 - i);
  9.        
  10.         result = result * recursed1;  
  11.     }
  12.  
  13.     console.log((result / num2).toFixed(2));
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top