Up to 1,000 primes

Modify the program that you wrote for the former exercise so that it
writes on screen the first 1,000 primes.