Skip to main content
Submitted by manoj on 21 October 2023
coding-cability

Write a program to print all prime factors of a given number.

For example, if the input number is 12, then the output should be “2 2 3”. And if the input number is 315, then the output should be “3 3 5 7”.