Question: Prime Factorization in C++ using tips Make a program for prime factorization (the decompositiorn of a composite number into a product of prime numbers) First,
Prime Factorization in C++ using tips

Make a program for prime factorization (the decompositiorn of a composite number into a product of prime numbers) First, read a positive integer from the user. Output the equation if the input is a composite number, and output "it is a prime number" if it is a prime number. (3 points) lease input a positive integer: 90 90 2 3 3 5 lease input a positive integer: 16 16 2222 Please input a positive integer 101 101 is a prime number Tips: 1. Start from finding the smallest prime factor of the number 2. If a factor k equals to the number n, end the process. 3. If the number n is divisible by k, get a new number n/k and repeat the finding process. 4. If n is not divisible by k, try factor k+
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
