Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve(numOne, numTwo){
  2.     factorialOne = 1;
  3.     factorialTwo = 1;
  4.     for(let i = numOne; i >= 1; i--){
  5.         factorialOne*= i;
  6.     }
  7.  
  8.     for(let y = numTwo; y >= 1; y--){
  9.         factorialTwo*= y;
  10.     }
  11.     let final = factorialOne / factorialTwo
  12.     console.log(final.toFixed(2))
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement