C program to print n prime numbers

C program to print n prime numbers

Output:

How many Prime Numbers ?
10
2 3 5 7 11 13 17 19 23 29

Implementation: