#C5533. Prime Numbers Generator
Prime Numbers Generator
Prime Numbers Generator
You are given an integer ( n ). Your task is to generate all prime numbers in the range ( [2, n] ) (i.e. all primes up to and including ( n )). A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. For example, if ( n = 10 ), the prime numbers are 2, 3, 5, and 7.
inputFormat
The input is provided via standard input (stdin) and consists of a single integer ( n ), where ( n ) can be as small as 1.
outputFormat
Output the prime numbers in increasing order separated by a single space on standard output (stdout). If there are no prime numbers in the range, output nothing.## sample
10
2 3 5 7