What are the steps that the loop needs to do? You need to research the algorithm for finding prime numbers.

Use code tags, not quote tags, to format the code.