Advertisement
galink

Untitled

Aug 26th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. function magic ([arg1]){
  2. let n = Number(arg1);
  3. let num = '';
  4.  
  5. for (let num1 = 1; num1 <= n; num1++) {
  6. for (let num2 = 1; num2 <= n; num2++) {
  7. for(let num3 = 1; num3 <= n; num3++) {
  8. for(let num4 = 1; num4 <= n; num4++){
  9. for( let num5 = 1; num5 <= n; num5++){
  10. for(let num6 = 1; num6 <= n; num6++){
  11. num = num1 * num2 * num3 * num4 * num5 * num6;
  12. if(num == n) {
  13. console.log(num1 + '' + num2 + '' + num3 + '' + num4 + '' + num5 + '' + num6);
  14. }
  15. }
  16. }
  17. }
  18. }
  19. }
  20. }
  21.  
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement