Digital root/Multiplicative digital root: Difference between revisions
Digital root/Multiplicative digital root (view source)
Revision as of 20:01, 29 July 2020
, 3 years ago→{{header|Ruby}}: Use Ruby 2.4 method "digits"
(Added Wren) |
(→{{header|Ruby}}: Use Ruby 2.4 method "digits") |
||
Line 2,583:
=={{header|Ruby}}==
{{works with|Ruby|2.
<lang ruby>def mdroot(n)
mdr, persist = n, 0
until mdr < 10 do
mdr = mdr.
persist += 1
end
|