Create a program that prints all whole numbers inclusively between an interval (a, b)
, and replaces multiples of 8 in the sequence with random (uniformly distributed, independent of other characters), non-numeric, non-whitespace, printable ASCII characters.
Assume 0 < a < b in all cases.
If the number has more than 1 digit, make sure the amount of characters in the replacement matches!
Examples:
(1, 16) -> 1 2 3 4 5 6 7 $ 9 10 11 12 13 14 15 n@
(115, 123) -> 115, 116, 117, 118, 119, :F<, 121, 122, 123
(1, 3) -> 1 2 3
Non-Examples:
(1, 16) -> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
(115, 123) -> 115 116 117 118 119 $ 121 122 123
This is code golf, so the shortest code in bytes wins!
Current Winner:
Most Popular: