my $n = shift or die; while( $n % 2 == 0 ){ print "2\n"; $n /= 2; } for( $_ = 3; $_ <= (my $sqrt || sqrt($n)); $_+= 2 ){ while( $n % $_ == 0 ){ print "$_\n"; $n /= $_; } } print "$n\n" if $n > 1
In reply to Re: Factoring Decimal Digits
by I0
in thread Factoring Decimal Digits
by Yossi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |