Prime Factors
Write a function named primeFactors which takes an integer as a parameter and prints all prime factors of the number. Prime factor of a number is a prime number that can divide corresponding number.
For example: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31 are the prime numbers which are smaller than or equal to 35 and just 5 and 7 can divide 35 without remainder. That's why, prime factors of 35 are 5 and 7.
Main function is already implemented for you, DO NOT CHANGE ANYTHING IN IT. You will just implement the function definition above the main function.
Examples:
Important issues about all exams/projects/quizzes:
- Update just Question.c file, not Question.txt.
- Make changes only between the following comments(DO NOT modify these comments or anything outside the region marked by the comments):
- // == CHANGE STARTS BELOW THIS LINE ==
- // == CHANGE STOPS ABOVE THIS LINE ==
- If you modify these comments for any reason, you can copy/paste the initial version from Question.txt into Question.c. Note that Question.txt is not graded at all, so anything you write in Question.txt will be discarded.
- To avoid getting the 'Binary Not Found' error, SAVE and BUILD your code before RUN.
- Do not add any extra messages message for input/output such as 'Enter an integer:', 'The result is:', etc. Any additional text that appears in the output will cause you to get no points from the question.
- Input and output of your program must be just like those in the Examples table above.