82.5k views
0 votes
Which number has exactly 3 factors?
2
4
6
8

1 Answer

2 votes

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:

User Hamidfzm
by
5.5k points