Company: Natwest_29aug
Difficulty: medium
Prime Numbers Problem Description A prime number is an integer greater than 1 that is divisible only by 1 and itself. A teacher writes a positive integer num on the board, and you must list every prime number from 2 up to num . Complete the function calculatePrimeNumbers(num) , which returns all the primes p with 2 <= p <= num in increasing order. Input Format Read from standard input. num The only line contains the integer num , the number written on the board. Output Format Print the prime numbers from 2 to num (both inclusive) in increasing order, on a single line, separated by single spaces. Constraints 2 <= num <= 25000 . (inferred -- the source states 1 < num < 10^9 ; from num = 29881 on, the output alone exceeds this judge's 18000-byte output limit, so the bound is lowered to 25000 , where the output is at most 15146 bytes.) The answer always contains at least one prime, because 2 <= num . Examples Example 1 Input: 11 Output: 2 3 5 7 11 Explanation: The prim