Daily Challenge #37

Express Number in Expanded Notation

Create a function that takes a number and return a string with the number in expanded notation (AKA expanded form).

Examples

expand(13) ➞ "10 + 3"

expand(86) ➞ "80 + 6"

expand(17000000) ➞ "10000000 + 7000000"

expand(5325) ➞ "5000 + 300 + 20 + 5"

Notes

You can expect only whole numbers greater than 0 as test input.

6 Likes

Hint to those scratching their heads: try using the length() block. :wink:

5 Likes

Max I was able to achieve after an hour.

1 Like

Use it in a result/value returning procedure.

1 Like

Has anyone found the solution??

15 hours to go

2 Likes

we are curious, show your blocks … :wink:

Actually I failed on this one, so I have to recheck the code again

Edit
bild

2 Likes

maybe something like that:


challenge_37.aia (10.4 KB)

a little awkward … admitted, but it works
lists are not my thing :wink:

4 Likes

As long as it is fully functional, it is ok

Here is mine

5 Likes

For the sake of completeness:

grafik

2 Likes