Need help in generating a list of all its prime factors

I am a beginner of C programming and I would like to know how to deal with this task:

Write a C program, when inputing an integer, a list of all its prime factors is generated(including repeated numbers)

(Here is a sample to show how the program runs:

Input an integer:
20
20=2X2X5 )


Please help me and thanks so much :(
Do you know how to determine if a number is prime (on paper)?
A prime number is a number which can only be divisible by 1 and itself.

to determine if it is prime on paper, I will try to divide it by different numbers, starting from 1, then 2 and so on<<I think my method can only be used to determine a small prime number @@

Is it correct?
sasanet
Here we go again, posting solutions to homework... How is anyone going to learn if people keep doing this? It isn't help you know.
ok you're wright I will discontinue doing this in the future.
sorry ^^
Topic archived. No new replies allowed.