Need a suggestion for an algorithm.
For a given number N i have to find all the prime numbers it's consisting of, like this:
N = 49
49 = 7 ^ 2
N = 168
168 = (2 ^ 3) * (3 ^ 1) * (7 ^ 1)
If you want to help me even more you can write the algo in c++.
Thanks.