Answer:
Given a number N, print all numbers in range from 1 to N having exactly 3 divisors. Examples: Input : N = 16 Output : 4 9 4 and 9 have exactly three divisors. Divisor Input : N = 49 Output : 4 9 25 49 4, 9, 25 and 49 have exactly three divisors.
Explanation: