You are viewing a single comment's thread. Return to all comments →
php
function superDigit($n, $k) { $x = array_sum(str_split($n)) * $k; while ($x >= 10) { $x = array_sum(str_split($x)); } return $x; }
Seems like cookies are disabled on this browser, please enable them to open this website
Recursive Digit Sum
You are viewing a single comment's thread. Return to all comments →
php