in reply to Divisors for a number

Sure!

What did you try? ¹

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)

PS: Je suis Charlie!

¹) What, not even googling? ;)

Replies are listed 'Best First'.
Re^2: Divisors for a number
by rasy (Initiate) on Mar 03, 2015 at 23:24 UTC
    Like to learn to write this program in perl String r = ""; int p = 2; while (n > 1) if (n%p == 0) { r += (p+","); n /= p; } else p++;