Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function uniquePINCodes(input) {
- let endFirst = Number(input[0]);
- let endSecond = Number(input[1]);
- let endThird = Number(input[2]);
- for (let first = 2; first <= endFirst; first += 2) {
- for (let second = 2; second <= endSecond; second++) {
- for (third = 2; third <= endThird; third += 2) {
- if (second === 2 || second === 3 || second === 5 || second === 7) {
- console.log(`${first} ${second} ${third}`);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment