I have toubles with a prog. I don't know how to do it! It would be so nice if someone could help me.

I have to find an algorithm to calculate all prime numbers (zB.: 2,3,5,7,11,13,...) of an Inputnumber. For example: 8!
8:2=4 4:2=2 2 is a prime number.

The output shout be systematic. Those who are the most should be displayed at first.

Thanks for your help!