Basic algorithm review: output all daffodil numbers

Without further ado, the js version code is as follows:

You can also do it yourself without using the parseInt system function. By taking the remainder, divide by 10 and then take the remainder, so that each digit from the ones to the hundreds is taken out. Another method is to directly traverse each digit through a three-layer for loop. Bits 0-9, but this method is less efficient.

Guess you like

Origin blog.csdn.net/jnbbwyth/article/details/131115430