Counting the number of letters in a number in binary using PHP
This code is inspired by Matt’s recommendation to “double check” in this video: https://youtu.be/LYKn0yUTIU4?t=4m43s <?php $limit = 1000000; // this is the only thing you’ll want to change, this is the highest number we’ll check against $eighteen = 0; $thirteen = 0; $i = 0; while ($i < $limit){ $i++; $currentStop = countLetters($i); if ($currentStop […]