Write a program to Generate prime numbers between 1 & given number.

 

Note: A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.

 

Output: