This post is part of a series on Mohammad Anwar’s excellent Weekly Challenge, where hackers submit solutions in Perl, Raku, or any other language, to two different challenges every week. (It’s a lot of fun, if you’re into that sort of thing.)
Task #1 this week is straightforward. Here’s what Mohammad had to say about it:
Write a script to accept two numbers between 100 and 999. It should then print all Stepping Numbers between them.
A number is called a stepping number if the adjacent digits have a difference of 1. For example, 456 is a stepping number but 129 is not.
Update [2020-Mar-28]
There seem to have been two interpretations to this problem. In my weekly review, I noticed there were several people in both of the following groups:
Continue reading “PWC 052 › Stepping Numbers”