Code (PHP) pasted on 2024-10-03, 22:14 Raw Source
- <?php
- foreach ($array as $k=>$v) { // Loop through numbers
- // If number does not contain 8,9 or 0 and sum of all 4 numbers is 10
- // Apply function to multiply each number by 10 and add to result array
- }
- }
- function magnitude($val) { // function to multiply by 10 for array map
- return($val * 10);
- }