You are viewing a single comment's thread. Return to all comments →
Perl:
sub findDigits { my $n = shift; my $cnt = 0; my @digits = split("", $n); foreach (@digits) { next if ($_ == 0); $cnt++ if ($n % $_ == 0); } return $cnt; }
Seems like cookies are disabled on this browser, please enable them to open this website
Find Digits
You are viewing a single comment's thread. Return to all comments →
Perl: