Plz write a program - Primes


Given an integer N <= 100, output the first N primes, one per line.

Sample Input:
4

Sample Output:
2
3
5
7


Comments

  • :
    : Given an integer N <= 100, output the first N primes, one per line.
    :
    : Sample Input:
    : 4
    :
    : Sample Output:
    : 2
    : 3
    : 5
    : 7
    :
    :
    :

    I think this topic was discussed here not too long ago. Read on...
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion