Question: (C++) For a given integer n>1 , the smallest integer d>1 that divides n is a prime factor. We can find the prime factorization of

(C++)

For a given integer n>1, the smallest integer d>1 that divides n is a prime factor. We can find the prime factorization of n if we find d and then replace n by the quotient of n divided by d, repeating this until n becomes 1.

Write a program that determines the prime factorization of n in this manner, but displays the prime factors in descending order. For example, for n=3960, your program should produce:

11 5 3 3 2 2 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!