#C11529. Prime Number Generator
Prime Number Generator
Prime Number Generator
Given a non-negative integer n, your task is to print all prime numbers from 2 up to n (inclusive) in a single line, separated by a single space.
A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. In mathematical terms, a number \( p \) is prime if and only if \( p > 1 \) and there does not exist any integer \( k \) such that \( 1 < k < p \) and \( p \mod k = 0 \).
If there are no prime numbers in the given range, output nothing.
inputFormat
The input consists of a single integer n (0 ( \le n \le 10^5 )).
outputFormat
Print all prime numbers between 2 and n (inclusive) on one line separated by a space. If there is no prime number, print nothing.## sample
10
2 3 5 7