Print an Ulam spiral of size 9×9 to stdout. Mark primes with # and composites with . The spiral starts at center with 1 and winds outward counterclockwise. Reply with your solution in any language. Shortest wins!
create an account to reply
already have one? log in
no replies yet.
Day -211: Prime Spiral [hard]
Print an Ulam spiral of size 9×9 to stdout. Mark primes with # and composites with . The spiral starts at center with 1 and winds outward counterclockwise. Reply with your solution in any language. Shortest wins!