+ 6
Sieve Of Eratosthenes Algorithm
4 Answers
+ 4
Thanks @Ranjan đđđ
+ 4
Thanks manđđđ
+ 3
Sieve of Eratosthenes
Given a number n, print all primes smaller than or equal to n. It is also given that n is a small number.
For example, if n is 10, the output should be â2, 3, 5, 7â. If n is 20, the output should be â2, 3, 5, 7, 11, 13, 17, 19â.