Question: It's Prime Write a program called prime_factors.c that reads a integer n from standard input and prints the decomposition of n into prime factors If

It's Prime Write a program called prime_factors.c that reads a integer n from standard input and prints the decomposition of n into prime factors If n is prime it should instead print "n is prime" (where n is the integer) Make your program match the examples below exactly ./prime_factors Enter number: 6 The prime factorization of 6 is: 2 3-6 ./prime_factors Enter number 30 The prime factorization of 30 is: 2 3530 ./prime_factors Enter number 127 127 is prime ./prime_factors Enter number 2048 The prime factorization of 2048 is: 2*2*2*2*2*2*2*2*2*2*2-2048 ./prime_factors nter number:22500 The prime factorization of 22500 is: 2 23 35 * 5 *5 *5 22500 ./prime_factors nter number:22501 22501 is prime You can assume the user supplies an integer n > 2 You do not have do any error checking You do not have to check the return value from scanf When you think your program is working you can autotest to run some simple automated tests
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
