HP Forums

Full Version: (33s) DESCRIPTOR: 129663 → 1926131211
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For natural number input, DESCRIPTOR returns a description of that integer, eg for input

104449

the rpogramme returns

19341110

to be read as

one 9 three 4s one 1 one 0.

Limitation: The programme works correctly only if the input contains less than seven different figures.

Code:
1.    LBL D
2.    x=0?
3.    GTO G
4.    CLx
5.    10
6.    RTN
7.    LBL E
8.    CLVARS
9.    STO K
1.    LBL F
2.    x=0?
3.    GTO G
4.    CLx
5.    RMDR(K:10)+1
6.    STO i
7.    SGN
8.    STO+ [i]
9.    CLx
10.    IDIV(K:10)
11.    STO K
12.    GTO F
1.    LBL G
2.    CLx
3.    10
4.    STO i
5.    CLx
6.    STO T
1.    LBL H
2.    CLx
3.    RCL [i]
4.    x=0?
5.    GTO J
6.    CLx
7.    10*T+[i]
8.    STO T
9.    CLx
10.    10* T+i-1
11.    STO T
1.    LBL J
2.    DSE i
3.    GTO H
4.    CLx
5.    RCL T
6.    RTN

D: LN = 30        G: LN = 30
E: LN = 9        H: LN = 49
F: LN = 58        J: LN = 18
Reference URL's