Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function multiply(input) {
- let num = Number(input.shift());
- let first = num % 10;
- let second = (num / 10) % 10;
- let third = num / 100;
- for (i = 1; i <= first; i++) {
- for (j = 1; j <= second; j++) {
- for (k = 1; k <= third; k++) {
- console.log(`${i} * ${j} * ${k} = ${i * j * k + ";"}`);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment