Help for this page

Select Code to Download


  1. or download this
        while (length($num) > 1) {
            my $sum = 0;
            map { $sum += $_ } split '', $num;
            $num = $sum;
        }
    
  2. or download this
    1 while $num =~ s/(\d)(\d)/$1 + $2/e;