#C14703. Find Prime Numbers in a Range
Find Prime Numbers in a Range
Find Prime Numbers in a Range
In this problem, you are given two integers, (a) and (b), and you need to print all the prime numbers in the inclusive range ([a, b]). A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. Formally, a number (p) is prime if and only if (p>1) and for any integer (d) such that (2 \le d \le \sqrt{p}), (d) does not divide (p) (i.e., (p \bmod d \ne 0)).
Your program should read the input from standard input (stdin) and write the output to standard output (stdout). The output should be a single line of space-separated prime numbers. If there are no prime numbers in the given range, output an empty line.
inputFormat
The input consists of a single line containing two space-separated integers (a) and (b) representing the start and end of the range, respectively.
outputFormat
Print all prime numbers in the inclusive range ([a, b]) in one line separated by a single space. If no prime numbers exist in the range, print an empty line.## sample
10 20
11 13 17 19
</p>