9 lines
446 B
Plaintext
9 lines
446 B
Plaintext
;Task:
|
|
Take a [[wp:Natural_number|Natural Number]] in a given base and return the sum of its digits:
|
|
:* '''1'''<sub>10</sub> sums to '''1'''
|
|
:* '''1234'''<sub>10</sub> sums to '''10'''
|
|
:* '''fe'''<sub>16</sub> sums to '''29'''
|
|
:* '''f0e'''<sub>16</sub> sums to '''29'''
|
|
<br><br>
|
|
|