Write a program that writes the first 20 prime numbers, one number per line. Write it by defining howMany to be 20, and then writing the first howMany prime numbers. If you change the definition of howMany to 30, the program should show the first 30 prime numbers.

(Hint. You will find it useful to have another variable that keeps track of how many numbers have already been written. Keep going until the number written is equal to howMany.)

For this problem, a function isPrime(n) is available to you, which yields true if n is prime.

 

    [Language: Cinnameg  Kind: program]